remove from map()

Prev Next

This function removes the key-value pair with key a from a map b.

The return value of the function is the value of the removed key. If the map is an inherited value, only the visible value will be returned.

Note: Hidden values can be removed as well. See the explanations for the Empty Flag.

Parameters

Parameter

Description

a

Key of the key-value pair to be removed.

b

(optional) Name of the map. Default: "default".

Examples

Assume a map "myMap" with the elements {key1=val1, key2=val2, key3=val3}.

Parameter a

Parameter b

Result

Elements in map

key2

myMap

val2

{key1=val1, key3=val3}

key2

myMap

{key1=val1, key3=val3}

key1

myMap

val1

{key3=val3}