The "ds_list_add_list" Function

Syntax

ds_list_add_list(id, source);
ArgumentTypeDescription
idds_listThe data structure to add new data to
sourceds_listThe data structure to be added

Description

Adds the contents of a previously-created ds_list to the specified ds_list.

Intended only for use with JSON functions. Normally, adding one data structure to another simply stores a reference to the data structure, therefore this function is necessary to flag the list value as a data structure itself so its contents are written to the JSON file.

As JSON data is unordered by nature, there is no need to input an index at which to insert the new list.

Example

my_list = ds_list_create();
my_other_list = ds_list_create();
ds_list_add_list(my_list, my_other_list);