Nested data mapping - JSON Arrays

For the sake of simplicity, I’ve created a fake JSON response to ensure that I have control over the outcome. Now, I’m facing difficulties in mapping the response in AppFarm when I have multiple arrays with the same structure. If I choose the index of a specific array, it works fine. However, I was under the impression that it should be possible to loop through them.

This works:

But not this:

Is the solution to some how use nested data mapping here? I have tried some setups, without any luck :frowning:

Hey @doffpett!

Unfortunately, it is currently not possible to handle arrays of arrays directly. A workaround would be to use the parser to reformat your data. How it will look depends on your use case.

If you need to preserve data grouping, you can convert the inner array into an object, where the array becomes the value:

[{1: [....], 2: [....], ....}]

Whereas if grouping is irrelevant, you can probably simplify it and get rid of the inner arrays entirely:

{"label": ..., "value": ..., .....}, 
{"label": ..., "value": ..., .....}, 
{"label": ..., "value": ..., .....}, 

Hope this helps!