Map keys
Description
Pure function returning every key in the map as a string array, sorted so the order is stable between runs. Feed it into For each to walk the map. Keys are always strings at run time, whatever key type the map declares.
When to use
Use Map keys to get every key in a map — for example, to iterate over a lookup table built earlier in the pipeline. Keys are always returned as strings at run time, whatever key type the map declares, and the array is sorted so the order is stable between runs. Feed the Result output straight into For each to walk every entry, using each key with Map get to read back the corresponding value.
Pins
Input pins
| Pin | Type | Default | Notes |
|---|---|---|---|
| Map | generic{generic} | — | The map whose keys to list. Key and value types resolve at design-time from the connected source. A null map counts as empty and returns an empty array. |
Output pins
| Pin | Type | Notes |
|---|---|---|
| Result | string[] | Every key in the map, sorted so the order is stable between runs. Keys are always strings at run time, whatever key type the map declares. |
Example
Log every entry of a map built by earlier Map put calls. Wire the map local variable into the Map input of Map keys, then wire its Result output into the Array input of For each. On the Loop body execution output, wire the Element output into the Key input of Map get — with the same map wired into its Map input — and log the resulting value.