Skip to main content

Map Loop

Command description

Iterates through a map and exposes each key, value, and zero-based index to the indented child commands.

Command Input Parameters

input parametersInput parameter typeDescription
MapdictMap to iterate; may also be a Python dict literal

Command Output Parameters

Output parametersOutput parameter typeDescription
KeyanyCurrent map key
ValueanyValue associated with the current key
IndexintZero-based index of the current entry

Example 1

Example 2

Loop over Python dict literals.

[
{
"children": [],
"in": {
"Map": "{'a':1, 'b':2}"
},
"out": {
"Key": "key",
"Value": "value",
"Index": "map_index"
},
"ins": "Map Loop"
}
]