Need Help with Nested Iterators for Processing API Response in JSON Format

Hello everyone,

I’m currently working on an automation project in make.com where I need to process a JSON response from a sports API. The JSON contains an array of football matches, and each match includes a nested array of predictions. My goal is to extract specific data from each prediction of every match and then send this data to Google Sheets.

Here an example of the JSON I get from the first iterator on array {{42.data.data}}

    {
    "id": 18871049,
    "sport_id": 1,
    "league_id": 609,
    "season_id": 21827,
    "stage_id": 77464626,
    "group_id": null,
    "aggregate_id": null,
    "round_id": 309958,
    "state_id": 1,
    "venue_id": 286468,
    "name": "Veres vs Kolos Kovalivka",
    "starting_at": "2024-02-25 11:00:00",
    "result_info": null,
    "leg": "1/1",
    "details": null,
    "length": 90,
    "placeholder": false,
    "has_odds": true,
    "starting_at_timestamp": 1708858800,
    "predictions": [
        {
            "id": 11481873,
            "fixture_id": 18871049,
            "predictions": {
                "bet": "1",
                "bookmaker": "betfair",
                "fair_odd": 3.69,
                "odd": 3.95,
                "stake": 0.5,
                "is_value": false
            },
            "type_id": 33
        }
    ],
    "__IMTINDEX__": 2,
    "__IMTLENGTH__": 50
},

So far, I have managed to iterate over the matches using an iterator module and then another iterator for the array predictions only when the length of the array is higher than 0.

I get this output bundle for the array {{128.predictions}}:
[
{
“id”: 11481873,
“fixture_id”: 18871049,
“predictions”: {
“bet”: “1”,
“bookmaker”: “betfair”,
“fair_odd”: 3.69,
“odd”: 3.95,
“stake”: 0.5,
“is_value”: false
},
“type_id”: 33,
IMTINDEX”: 1,
IMTLENGTH”: 1
}
]

However, I’m facing challenges with the nested predictions array. I need to iterate over each prediction for every match, extract data (e.g., bet , bookmaker , odd ), and then input these details into Google Sheets.

What I’ve Tried:

  1. Using an iterator module to go through the matches array.
  2. Attempting to set up a nested iterator for the predictions array inside each match.

My Issue:

I’m not sure how to correctly set up the nested iterator to process each prediction and then how to extract and map the specific fields from the predictions to Google Sheets.