Skip to main content

remove (Function)

Function returns the updated map after removing the element with the specified key.

Syntax

<OBJECT> map:remove(<OBJECT> map, <OBJECT|INT|LONG|FLOAT|DOUBLE|FLOAT|BOOL|STRING> key)

Query Parameters

NameDescriptionDefault ValuePossible Data TypesOptionalDynamic
mapThe map that needs to be updated.OBJECTNoYes
keyThe key of the element that needs to removed.OBJECT INT LONG FLOAT DOUBLE FLOAT BOOL STRINGNoYes

Example 1

map:remove(stockDetails, 1234)

This returns the updated map, stockDetails after removing the key-value pair corresponding to the key 1234.