List Loop
Command description
Iterates through a list and exposes the current item and zero-based index to the indented child commands.
Command Input Parameters
| input parameters | Input parameter type | Description |
|---|---|---|
| List Object | list[any] | List to iterate, such as a similar-element list or webpage list; may also be a Python list literal |
| Reverse Iteration | bool | Whether to iterate from the last item to the first; defaults to False |
Command Output Parameters
| Output parameters | Output parameter type | Description |
|---|---|---|
| Current Item | any | Current list item |
| Current Index | int | Zero-based index of the current item |
Example 1
Get the titles of all currently opened web pages
Example 2
Loop over Python list literals.
List Object in workflow JSON is a Python expression stored as a JSON string. Runavelo inserts that expression into the generated Python source.
[
{
"children": [],
"in": {
"List Object": "[1,2,3]",
"Reverse Iteration": "False"
},
"out": {
"Current Item": "listItem",
"Current Index": "listIndex"
},
"ins": "List Loop"
}
]