If you require to map fields from a nested array into a single array, please follow the instructions below:
Illustrated in the image below is an example of a flow where a Record Generator is used as a source step, the payload is then being mapped, grouped and stored in a buffer.
The below image is a Record Generator source step which contains a JSON payload with a nested array.
The page below is the output from the Record Generator.
The Super Mapper is used to map 2 of the nested array fields to a new array as shown in the below image.
The below image is the output from the Super Mapper step.
The Group step groups the data based on the array name as illustrated in the below image.
A Calculator step is added after the Group step to test how the dataset gets returned after the field/array is grouped. The output is returned as shown in the below image.
The below image is a Calculator step that contains a nested for loop in JSON.
The below page is the returned data after the Calculator step where the required fields from the nested array is returned in one array.