Question: My JSON array is as follows.

```
[{"20656":"20656","20648":"20648","20666":"20666","20657":"20657","20658":"20658","20659":"20659","20660":"20660","20665":"20665","20672":"20672","20667":"20667","24517":"24517","20677":"20677","20662":"20662","24605":"24605","20675":"20675","20663":"20663","20649":"20649","20664":"20664","20668":"20668","20669":"20669","20670":"20670","20671":"20671","20673":"20673","20674":"20674","20676":"20676"}]

```

How do I use each individual value and use it as a variable for my next query.

Thanks,

Answer: 
Assuming your variable looks like this

[![enter image description here](https://i.stack.imgur.com/EnXW3.png)](https://i.stack.imgur.com/EnXW3.png)

Add **Select Action**

[![enter image description here](https://i.stack.imgur.com/YDDoF.png)](https://i.stack.imgur.com/YDDoF.png)

Which has **From** property set to

```
split(replace(replace(replace(variables('MyJsonArray'),'[{',''),'}]',''),'"',''),',')

```

And **Map** to pair **MyID** with expression

```
substring(item(),0,lastIndexOf(item(),':'))

```

Now you can simply iternate over all IDs with simple **Foreach** and refer to each ID by using expression

```
item()['MyID']

```

[![enter image description here](https://i.stack.imgur.com/bVAQ7.png)](https://i.stack.imgur.com/bVAQ7.png)
You can use "Parse JSON" action to parse your json data.

First, I create a "Initialize variable" action to store the json data(shown as below screenshot)

[![enter image description here](https://i.stack.imgur.com/EPxan.png)](https://i.stack.imgur.com/EPxan.png)

Then create "Parse JSON" action to parse the json object above.

[![enter image description here](https://i.stack.imgur.com/WDOic.png)](https://i.stack.imgur.com/WDOic.png)

If you don't know how to create the schema, you can click "Use sample payload to generate schema" and input your json data into it. It will generate the schema for you automatically. You can also refer to this tutorial: <https://learn.microsoft.com/en-us/azure/logic-apps/logic-apps-perform-data-operations#parse-json-action>

After that, we can use each individual value as variable in our logic app.(I created "Initialize variable 2" in the screenshot below as an example).

[![enter image description here](https://i.stack.imgur.com/n2pwz.png)](https://i.stack.imgur.com/n2pwz.png)