Map Get | MAP_GET
Syntax
MAP_GET( [value], [key], [default = null] )
Parameters
value
A MAP / OBJECT.
key
A TEXT.
The key of the value to get from the VALUE.
default
The default can be any value.
It is returned if the KEY is not set in the VALUE
Return Value
Can return any type of value.Description
Get a value from a MAP / OBJECT by key.Examples
# VALUE is ["a" => 1, "b" => 2]
MAP_GET(VALUE, "a") # returns 1
# VALUE is ["a" => 1, "b" => 2]
MAP_GET(VALUE, "c") # returns NULL
# VALUE is ["a" => 1, "b" => 2]
MAP_GET(VALUE, "c", "q") # returns "q"