Reputation: 83
I have an array output from ACTIVITY script like this
Input json array
{
"result":[
{
"Val":[
{"pqr":1,"srt":2},
{"pqr":1,"srt":2}
]
}
]
}
How can I iterate this nested json object using a Foreach loop. I am getting error while I use @activity(script).output .result. Val to get the array values. Error: The length cannot be evaluated because property value doesn't exist
Upvotes: 1
Views: 987
Reputation: 14379
Set your For Each activity Items to:
@activity('Script').output.result[0].Val
and use it within the activity using the @item()
syntax, e.g.
@string(item().pqr)
Upvotes: 2