azure-logic-apps

Azure logic Apps how to read the array input parameter and set value of first item to a variable


I have action to make a call to web API which returns a JSON array of objects. Now i am trying to use Variable action to read the value of [0].propertyName.

for Variable I tried setting the value as @body('previous_action').first().propertyName but it failing to read the value.

how can i read the array value from previous output


Solution

  • Use the first() expression with the proper syntax …

    first(body('previous_action'))?['propertyName']