Pluxbox Logo

Loop list block

Purpose

Iterate through a list of items and execute all connected blocks for each item.

Input

  • List A list of items.

Output

  • Index The index number of the item in the list. Starts from 0. This will output a new number for every item in the list.

  • Item Will output an object for each item in the list.

Example

I have a list of x items. I want to number each items with an index number and retrieve first name & last name with two get data blocks. The get data blocks connect to a mutation block.

graph LR
A([List]) --> L(Loop array)
L --Index--> C(Label)
L --Item--> D(Get data)
L --Item--> E(Get data)

Caveats

  • The first index (0) is often treated as a false value when passed to other blocks.