ds_map_add_map

Description

With this function you can assign a (previously created)
ds_map to a key within the given ds_map. 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. If
a ds_map has another map added in this way, then destroying the
parent map will also destroy the contained maps and free their
memory.

The above code will create two ds_maps, and then populate one
with a list and an array before adding it into the second, which is
then encoded into a JSON string. The map is then destroyed to
remove it, and any other maps or lists that it contains, from
memory.