Data / Map
data/map_keys
Map Keys & Values
Extracts all keys, all values, and the size of a Map.
Note: Pairs of keys[i] and values[i] correspond to the same entry. Use For Each on the keys list to iterate over all entries.
Inputs
| Name | Type | Optional | Description |
|---|---|---|---|
map |
any | The Map to decompose. |
Outputs
| Name | Type | Description |
|---|---|---|
keys |
list | List of all keys (strings), in insertion order. |
values |
list | List of all values, in key order. |
size |
number | Number of entries. |
Examples
Iterate over all map entries
Print every key-value pair in a map.
- Map Keys & Values → keys → For Each
- For Each → item (key) → Map Get (retrieve corresponding value)
- Player Message with formatted key+value