For Each
This node lets you iterate over a list of items with a for each loop.
Imagine you have a list of ad objects, the budget of which needs to be increased by 10%. If you have a list, but you want to make changes to an ad object one by one, For Each node will help you to iterate over each of the objects. When you trigger start
, the first object will appear in the item
output socket. When you trigger next
, the next item will be in the output.
Take a look at the example below to understand better how you can use it:
Example
![Notion image](https://www.notion.so/image/https%3A%2F%2Fs3-us-west-2.amazonaws.com%2Fsecure.notion-static.com%2Fb5380b1c-b60c-498b-9ef2-af1fb00425da%2FUntitled.png?table=block&id=be27c554-0e59-49c8-bc1b-e543badc5d93&cache=v2)
Input Fields
field | schema | explanation |
items | any | Input the list of objects that needs to be manipulated one by one. |
Output Fields
field | schema | explanation |
item | any | Item, which is ready to be manipulated. |
index | integer | Position of the item in the output. |
count | integer | Total number of objects in the list |
Video Tutorial
Relevant FAQs
Did this answer your question?
😞
😐
🤩
Last updated on October 11, 2022