I am trying to update some JSON in a logic app. Here is my JSON.
{
"headers": [
{
"count": 0,
"lookup": "PSI"
},
{
"count": 0,
"lookup": "Clean"
}
]
}
In a for each loop, I am trying to update the property count of a specific header array element.
Here is the setproperty I am doing.
@setproperty(variables('colObj'), 'headers', setproperty(items('For_each'), 'count', 1))
Currently, the setproperty only returns one element of the array and not the entire array.
I need the set property to return all elements of the headers array and to update the count property for the current foreach item.
Does anyone know how to do this in a logic app?



