Map Has Key | MAP_HAS

Syntax

MAP_HAS( [value], [key] )

Parameters

value
A MAP / OBJECT.

key
A TEXT. The key to check for in the VALUE.

Return Value

Returns TRUE if the VALUE has the VALUE, FALSE otherwise.

Description

Check if a MAP / OBJECT has a key.

Examples

# VALUE is ["a" => 1, "b" => 2]
MAP_HAS(VALUE, "a") # returns TRUE
# VALUE is ["a" => 1, "b" => 2]
MAP_HAS(VALUE, "c") # returns FALSE