Intermediate
How to process arrays with iterators on Make
Quick Answer
Process arrays in Make using the Iterator module to break down array elements into individual bundles. Each array item becomes a separate bundle that flows through subsequent modules, enabling individual processing of array elements.
Prerequisites
- Basic understanding of Make scenarios
- Familiarity with JSON data structures
- Knowledge of Make modules and connections
- Understanding of data mapping concepts
1
Add an Iterator Module to Your Scenario
Click the + button after your source module and search for Iterator. Select the Iterator module from the Flow Control category. This module will process each array element as a separate bundle.
Tip
Iterator is found under Flow Control, not in the Tools section
2
Configure the Array Input
In the Iterator settings panel, click on the Array field. Map the array data from your previous module by selecting it from the available variables. The array should appear in the mapping panel as something like
collection[] or items[].Tip
Make sure you select the actual array variable, not individual array elements
3
Connect Processing Modules After Iterator
Add modules after the Iterator to process each array element. Click the + button after the Iterator and add your desired processing modules (HTTP, Data transformers, etc.). Each module will receive one array element per execution.
4
Map Individual Array Element Data
In your processing modules, map data from individual array elements using the Iterator's output. The Iterator provides access to individual properties like
name, id, or value instead of the full array. Use these mapped values in your subsequent module configurations.Tip
The Iterator output shows individual properties, not arrays anymore
5
Handle Array Element Processing
Configure your processing modules to work with single values rather than arrays. For example, if processing user data, map
{{1.name}} and {{1.email}} from the Iterator output instead of trying to process the entire users array at once.Tip
Each bundle represents one array element, so avoid array-specific functions here
6
Add an Array Aggregator (Optional)
To collect processed results back into an array, add an Array Aggregator module at the end. In the aggregator settings, set the Source Module to the Iterator and configure the Target structure to define how the collected data should be structured.
Tip
Aggregators are essential when you need to output a single array after processing
7
Test and Validate Array Processing
Run your scenario to test the array processing. Check the execution details to verify that the Iterator created the expected number of bundles (one per array element) and that each processing module received individual array elements correctly.
Tip
Use the scenario debugger to trace how each array element flows through your modules
Troubleshooting
Iterator shows 'No bundles processed'
Verify that you've mapped an actual array to the Iterator's Array field. Check that your source data contains a valid array structure and not a single object or empty value.
Processing modules receive entire arrays instead of individual elements
Ensure you're mapping data from the Iterator output (usually bundle 1) and not from the original source module. The Iterator should break down arrays into individual properties.
Scenario processes fewer bundles than expected
Check for empty or null values in your array that might cause the Iterator to skip elements. Review your array data structure in the previous module's output to identify any formatting issues.
Array Aggregator doesn't collect all processed items
Verify that the Source Module in the Array Aggregator is set to the Iterator, not the final processing module. This ensures all bundles created by the Iterator are properly collected.
Ready to get started with Make?
Put this tutorial into practice. Visit Make and follow the steps above.
Visit Make →