Make Iterator: process each item in a list
Make Free can take a list that's nested and break it into individual bundles, map each element, and check for the empty list case before the real action is bound.

An array is just a series of values. The Iterator (opens in a new tab) in Make divides it into individual records (called bundles) that other modules can handle one at a time.
Before you start
First, you will need an account on Make. You can create a Make Free account (opens in a new tab) or login. For this exercise you can do it without integrating another app.
This Make Free demo scenario that's processing a fake shopping list. It's just using some of the built-in modules and not pushing any data out of make. Set your scenario to Inactive.
1. Create a list to practise with
- Scenarios > Create scenario
- Change the scenario name in the top left to Iterator shopping-list practice
- JSON > Parse JSON
- Don't specify Data structure
- Paste in the example for JSON string
- Save the module, and the scenario. Only select "Save anyway" if you get the message that your output is not being used.
- Run once
- Again, if you get the warning that your output is not being used, select "Run anyway"
- Look at the JSON output for an items array.
{"items":[{"name":"Notebook"},{"name":"Pencil"},{"name":"Eraser"}]}
The outer braces is one object. The list is in the items field. That's different from an array at the top level. See how Parse JSON can already emit multiple bundles (opens in a new tab) for a top level array.
2. Split the items array
- Hide results. Flow Control > Iterator after Parse JSON.
- Click Array. In JSON 1 - Parse JSON, choose items[].
- Save. Run once. Deal with the "not using output" warning (same as above).
- Look inside the result bubble of the Iterator. In its Output, notice three bundles: Notebook, Pencil and Eraser.
Watch out
Each of them will trigger any module after the Iterator. So with this 3 items list you will get 3 runs of the next Tools module. Just check the count of output before adding any module that will send messages or create records or any modules that will cost more credits (with smaller sample to see the count of output).
3. Use the current item
- In tools add Set variable after Iterator.
- Name the variable as current_item.
- In Variable value select name from Flow Control 2 - Iterator.
- Save and hit Run once. Now you should have 3 operations in Tools result bubble. Click on each of them and see output.
Notebook, Pencil and Eraser. If you choose a value from the original array you would be skipping the field of the current item.
If nothing runs after the Iterator
Look at your source array; this is a practice that gets to the Iterator for {"items":[]} but doesn't go through the next Tools module. Revert your 3-item example and try again.
If you don't have name in your mapping panel, try using the example again on source and Iterator and go back to Tools.
Make sure you see Array and the mapped array token there.
Why does the result show only one operation?
You can get multiple output bundles out of a single operation. For example, in this other Parse JSON example, you have an array of 3 items with names at top level.
So JSON is run once, and you get three bundles Notebook, Pencil, Eraser.
The sample value on the map panel is Notebook. The following Tools > Set variable module has 1 mapped name field token. One run for each input bundle. It provides 3 bundles, therefore it will run 3 times (each time using the name from the provided bundle).
Look at Output from source result prior to implementing Iterator. You should implement an Iterator if you need to "split" an array field. If you already have separate bundles, you can pass them straight into the next module. Refer to the two input Parse JSON comparison to see exact inputs and process.
No account? Begin with Make Free (opens in a new tab) first. Review Free plan limits prior to the larger list scheduling.
Share this post
From holdmytwist.com/blog/make-iterator-beginners/

