Skip to main content

The "ds_list_add_map" Function


ds_list_add_map(id, source);
idds_listThe data structure to add new data to
sourceds_mapThe data structure to be added


Adds the contents of a previously-created ds_map 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 map 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 map.


my_list = ds_list_create();
my_map = ds_map_create();
ds_list_add_map(my_list, my_map);