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

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

MPA_User Group Leader_768x460.jpg

Manage your user group events

Check out the News & Announcements to learn more.

V3_PVA CAmpaign Carousel.png

Community Challenge - Giveaways!

Participate in the Power Virtual Agents Community Challenge

Carousel 2021 Release Wave 2 Plan 768x460.jpg

2021 Release Wave 2 Plan

Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.

R2 (Green) 768 x 460px.png

Microsoft Dynamics 365 & Power Platform User Professionals

DynamicsCon is a FREE, 4 half-day virtual learning experience for 11,000+ Microsoft Business Application users and professionals.

Users online (1,519)