put

put ( object key , object value ) : void

Caution: this function is an exception in Grimport. You need to use it in pointer mode. The pointer is the map.
Allows to add an pair key-value in a map (an associative array).

Example



map=["a":1,"b":2]
map.put("c", 3)

console(map) //["a":1,"b":2,"c":3]]


See also

add

Parameters

key

The key of the element to add in the map

value

The value of the element to add in the map