I'm building this flow where I parse JSON from a query against Power BI to later create some conditional logic based on the values inside the array.
Unluckily I get this error: The execution of template action 'Apply_to_each' failed: the result of the evaluation of 'foreach' expression '@@body('Parse_JSON')?['@{variables('New Array')}']'
' is of type 'String'. The result must be a valid array.
And this is my squema:
I suspect you are parsing the JSON from the object returned by Power BI and not the "results" property. Results is the array. If your current schema is working for you then just make sure you use the Results dynamic content in your loop. Or when you get the content back from Power BI make sure you use the Results property and not the whole body.
Michael E. Gernaey
783
Super User 2025 Season 2
Tomac
515
Moderator
trice602
299
Super User 2025 Season 2