azureazure-logic-apps

How can I add items from my parsed JSON into an existing array variable in Logic Apps


I'm creating a Logic App which queries data from an external endpoint, the endpoint paginates data and contains total number of records count in all requests; using that I offset the query by 400 records each time so I can essentially get all the data.

The issue I'm having is I'm not sure how I can add the items from my "Parse External Data" to my "Contact" array variable (which is set at the top of my flow).

The parsed object has two objects, "Search" and "Data", the Data contains an array of items. I want to add all the items to my set Array variable in Logics apps. How can I do this?

Here is an image of my until loop where most of the logic sits, I have an Array variable setup called "Contacts".

enter image description here


Solution

  • In the end I created a Compose action with the variable information, and then joined the data at the end of a JS function and updated my variable with its output.