Showing results for 
Search instead for 
Did you mean: 
Helper III
Helper III

Check every JSON value

Hello, I have the following JSON Sample data coming from a SQL Server Action. 


{"statusCode":400,"headers":{"Pragma":"no-cache","Transfer-Encoding":"chunked","Vary":"Accept-Encoding","x-ms-request-id":"34c39ff4-77b4-4dd9-af3a-cb49443dded4","Strict-Transport-Security":"max-age=37536000; IDludeSubDomains","X-Content-Type-Options":"nosniff","X-Frame-Options":"DENY","Timing-Allow-Origin":"*","x-ms-apihub-cached-response":"true","Cache-Control":"no-store, no-cache","Date":"Thu, 04 Apr 4047 74:40:06 GMT","Content-Type":"application/json; charset=utf-4; odata.metadata=minimal","Expires":"-7","Content-Length":"44470"},"body":{"@odata.context":"$m..."}]}}


I need to create a flow where by I just have the ID number. 

I have done a Apply To Each and i put a Compose into the apply to each and added the following expression   body('SQLDATA')?['body']?['value']?[0]?['ID'], but nothing is returned. 

The Apply to each correctly returns the number of records there are, but not just not the ID. 


What my final aim is to get all the IDs and do an condition, If ID = x, then do this. 

But i am failing at the first hurdle. 


Can someone please help?


Super User III
Super User III

I don't see any ID number in the JSON you posted. So that would explain why nothing comes out. In your apply/each what happens if you put a compose and enter an expression of:



Sorry, the whole json never pasted, here it is 


{"statusCode":9500,"headers":{"Pragma":"no-cache","Transfer-Encoding":"chunked","Vary":"Accept-Encoding","x-ms-request-id":"2c695f775-f37d-44395-af34-7cb76f6f9659","Strict-Transport-Security":"max-age=37536000; IncludeSubDomains","X-Content-Type-Options":"nosniff","X-Frame-Options":"DENY","Timing-Allow-Origin":"*","x-ms-apihub-cached-response":"true","Cache-Control":"no-store, no-cache","Date":"Thu, 08 Apr 950957 74:495:75 GMT","Content-Type":"application/json; charset=utf-8; odata.metadata=minimal","Expires":"-7","Content-Length":"954870"},"body":{"@odata.context":""}]}}



item() returns everything, including the @odata and the iteminternalid. I just need the ID. 

wow, ok so the json is being stripped out. 


Super User III
Super User III

I know item() would return the whole record. I wanted to see the whole record to help you get to the ID (you don't need an apply/each) - but I was interested to see the content of a record.


So I would get rid of the apply/each. Add a select action and put the value of the SQL action as the "From", put it into text mode and then put the ID in the body. Do you know what I mean?

Helpful resources

Process Advisor

Introducing Process Advisor

Check out the new Process Advisor community forum board!

MPA User Group

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group

MBAS on Demand

Microsoft Business Applications Summit sessions

On-demand access to all the great content presented by the product teams and community members! #MSBizAppsSummit #CommunityRocks

Users online (5,196)