A sequence of key : value pairs, where key is a string and value is any type. The sequence is comma separated and wrapped in curly brackets.
The keys are case independent, and are used to find entries in the map, similar to how you use an index 1,2,3... to find entries in an array.
Since the value is any type, it can be another map, making any valid json ok as a map.
if mymap has value {"key1":3mm, "anotherkey":"somevalue"}
then mymap("anotherkey") is the string "somevalue".
if mymap2 has value {"key":"val", "submap":{"key2":"val2"}}
then mymap2("submap") is the map {"key2":"val2"}
SetMapValue(map,key,value) - adds an entry or updates an existing entry in a map.
Works with context lookup string or with variable name (as string either way).
A map can be specified using a valid json string like this:
{"key":"val","submap":{"key2":"val2"}}
It also accepts square brackets as long as they are matched:
{"key":"val","submap":["key2":"val2"]}
MapKeys gets a sorted array of keys from a map.
If mymap is this… {"key":"val", "submap":{"key2":"val2"}}
then MapKeys(mymap) is this array of two strings… ["key", "submap"]
These strings are the keys of mymap at the top level. Even though the value of the second map element is another map, that doesn’t matter, as we are only looking at the keys if mymap is here.
v12.1.0.4 [20241128] Middleware conversion for colors from maps and arrays. The MAP function, converts string rep of map or array or points to a map.
v12.1.0.9 [20250206] Middleware function MapKeys gets a sorted array of keys from a map.
Yield and YieldMap can be used for generating array or map contents.
[ for each x in [3 to 5] { yield x*2 } ] ==> [6,8,10]
[ for each key,val in [3:5,4:6] { yieldmap key : val*2 } ] ==> [3:10,4:12]
let primes := [
for each x in [1 to 100] {
let isprime := true;
for each y in [2 to x-1] {
if mod(x,y) = 0 then
let isprime := false;
exit for;
end if }
if isprime then
yield x
end if } ]