Array to set multivaliation

Hello everyone, I hope you’re all having a wonderful day!

I’m receiving data in the following array format via a webhook:

json

[
  {
    "sheetName": "youtube",
    "row": 2,
    "data": [
      "first",
      "second",
      "third",
      "fourth",
      "fifth",
      "sixth",
      1
    ]
  }
]

I would like to use the Set Multiple Variables module in Make.com to transform the data array into a JSON structure like this:

json

{
  "1": "first",
  "2": "second",
  "3": "third",
  "4": "fourth",
  "5": "fifth",
  "6": "sixth",
  "7": "seventh"
}

What would be the best way to achieve this?

If there’s a better or more efficient method, I’d really appreciate your suggestions. Thank you! :blush:

Iterate the original array and the aggregate it into the new array.