With this function you can replace a ds_list that has been stored in the given "key" with another list that has been created previously. This function is designed for creating JSON compatible maps which you would then encode using json_encode and should only be used in conjunction with that functionality.
ds_map_replace_list(id, key, value)
|id||The id of the map to use.|
|key||The key to replace.|
|value||The id of the ds_list to use to replace the one previously stored in the given key.|
var j_list = ds_list_create();
ds_map_replace_list(j_map, "list", j_list);
var j = json_encode(j_map);
The above code will create a ds_list and populate it with the values of various global variables before replacing a previously stored list in the ds_map "j_map".