Hi All,
I have a json response, which returns an array, with company data called farms, and within that array is a second nested array, named relations . I need a value from each of those (farmID from the main array "farms" and partyID from the nested array "relations".)
I have been able to fill a variable with FarmID and do that for all companies in the json, with a for each loop. However if I want to add the second variable, power automate starts to create nested loops, which seem to go nowhere and get stuck (infinite loop perhaps?)
What i need to happen is that i loop through each company, set the farm and party ID, so I can use it in another HTTP get, after which we go to the next company..rince repeat..
Does anyone have any idea, I was maybe thinking I need to call a specific array value in a parent/child manner like farm?relations?[0], but havent been able to get that syntax to work
Below what is happening: I created the two set variables actions, but MS moves the second one (which is the nested array) automatically in to the last for each loop (for each 1)

Example json from postman:

PS the output from the parse json has the information exactly the same as the postman output.
Does anyone have any ideas, or a better way to do it, in case I am completely off track
Cheers
Hans