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:
{
"type": "object",
"properties": {
"body": {
"type": "object",
"properties": {
"results": {
"type": "array",
"items": {
"type": "object",
"properties": {
"tables": {
"type": "array",
"items": {
"type": "object",
"properties": {
"rows": {
"type": "array",
"items": {
"type": "object",
"properties": {
"ShortView Mix[Source]": {
"type": "string"
},
"ShortView Mix[Status]": {
"type": "string"
},
"[IsGrandTotalRowTotal]": {
"type": "boolean"
},
"[SumCount]": {
"type": "integer"
}
},
"required": [
"[IsGrandTotalRowTotal]",
"[SumCount]"
]
}
}
},
"required": [
"rows"
]
}
}
},
"required": [
"tables"
]
}
},
"firstTableRows": {
"type": "array",
"items": {
"type": "object",
"properties": {
"ShortView Mix[Source]": {
"type": "string"
},
"ShortView Mix[Status]": {
"type": "string"
},
"[IsGrandTotalRowTotal]": {
"type": "boolean"
},
"[SumCount]": {
"type": "integer"
}
},
"required": [
"[IsGrandTotalRowTotal]",
"[SumCount]"
]
}
}
}
}
}
}

