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 parameters | Input parameter type | Description |
|---|---|---|
| Map | dict | Map to iterate; may also be a Python dict literal |
Command Output Parameters
| Output parameters | Output parameter type | Description |
|---|---|---|
| Key | any | Current map key |
| Value | any | Value associated with the current key |
| Index | int | Zero-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"
}
]