Skip to main content

containsKey (Function)

Function checks if the map contains the key.

Syntax

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

Query Parameters

NameDescriptionDefault ValuePossible Data TypesOptionalDynamic
mapThe map the needs to be checked on containing the key or not.OBJECTNoYes
keyThe key to be checked.INT LONG FLOAT DOUBLE BOOL STRINGNoYes

Example 1

map:containsKey(stockDetails, '1234')

Returns true if the stockDetails map contains key 1234 else it returns false.