Skip to content

Map Functions

Before going in note that any time VARNAME or FUNCNAME is written, it means a variable or function in the form Collection@Variable or a literal.

map_get

Syntax:

VARNAME1(_) = map_get(VARNAME2(map), VARNAME3(str))
Returns the element in map VARNAME2 with key VARNAME3 and assigns it to VARNAME1

map_remove

Syntax:

VARNAME1(_) = map_remove(VARNAME2(map), VARNAME3(str))
Removes the element in map VARNAME2 with key VARNAME3 and assigns a cloned map of the result to VARNAME1

map_has

Syntax:

VARNAME1(bool) = map_has(VARNAME2(map), VARNAME3(str))
Assigns VARNAME1 to true if map VARNAME2 has key VARNAME3, else false

map_keys

Syntax:

VARNAME1(arr) = map_has(VARNAME2(map))
Returns a list of all keys in map VARNAME2 to VARNAME1

map_put

Syntax:

VARNAME1(map) = map_has(VARNAME(map)2, VARNAME3(str), VARNAME4(_))
Clones map VARNAME2, adds entry with key VARNAME3 and value VARNAME4 and assigns the cloned result to VARNAME1