Array Operations¶
The Array Operations block lets you modify lists (arrays) of data. You can add items, remove them, or filter the list based on specific conditions.
Inputs¶
- Operation: The action to perform:
push: Add an item to the end.pop: Remove the last item.shift: Remove the first item.unshift: Add an item to the beginning.filter: Keep only items that match a condition.
- Datasource: The name of the variable containing the list.
- Value: The item to add (for push/unshift).
- Use Param As Input: If checked, uses the output from the previous block as the value to add.
- Filter Conditions: (For filter operation) Rules to decide which items to keep.
Logic¶
- The block gets the list from the Datasource.
- It performs the selected Operation.
- For
filter, it checks each item against the Filter Conditions. - The modified list is saved back to the Datasource.
- The updated list is also output by the block.