Hi
Inside an Apply to Each loop's Data-Compose action, if I add an expression using 'addProperty' to add a dynamically created key and value (both created using the loop item data) the object variable remains empty after the loop.
An example of the addProperty withing the Data-Compose action might be:
addProperty(variables('obj_var'), item()['key'], item()['value'])On the loop completing the Data-Compose action Output contains an array of objects each containing a single property, rather than my hoped for single object containing the comma seperated list of key:value property pairs eg.
{ "name":"John", "age":30, "car":null }
Is it possibe to add dynamically created key:values using addProperty to an object variable within a loop?
Thanks