cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
GuttormG
Frequent Visitor

Get data from JSON

I have a flow that gets new posts from Teams. I use triggerBody() to extract the data, and pase this to JSON. So far so, good 🙂
Now I want to get only a few values from this JSON. How do I get the values marked in this JSON?

I have tried things like outputs('Parse_JSON')?['sections']?['facts'] in several different ways, but either the flow fails, or I get a null-value.

Any suggestions?

 

GuttormG_0-1642770950202.png

 

1 ACCEPTED SOLUTION

Accepted Solutions
Pstork1
Dual Super User
Dual Super User

Since Sections and facts are both arrays you'll need to add an index number to reach them directly.  Something like this

outputs('Parse_JSON')?['sections'][0]?['facts'][0]?['value'] 

 



-------------------------------------------------------------------------
If I have answered your question, please mark your post as Solved.
If you like my response, please give it a Thumbs Up.

View solution in original post

2 REPLIES 2
Pstork1
Dual Super User
Dual Super User

Since Sections and facts are both arrays you'll need to add an index number to reach them directly.  Something like this

outputs('Parse_JSON')?['sections'][0]?['facts'][0]?['value'] 

 



-------------------------------------------------------------------------
If I have answered your question, please mark your post as Solved.
If you like my response, please give it a Thumbs Up.
GuttormG
Frequent Visitor

Ahh, thank you very much! Got almost crazy of all the brackets, question marks and index numbers I couldn't figure out. 
Also, I had to use body() instead of outputs(). Don't know why, but it works now!

Helpful resources

Announcements
MPA Virtual Workshop Carousel 768x460.png

Register for a Free Workshop

Learn to digitize and optimize business processes and connect all your applications to share data in real time.

Power automate tips 768x460 v2.png

Restore a Deleted Flow

Did you know that you could restore a deleted flow? Check out this helpful article.

Microsoft Build 768x460.png

Microsoft Build is May 24-26. Have you registered yet?

Come together to explore latest innovations in code and application development—and gain insights from experts from around the world.

May UG Leader Call Carousel 768x460.png

What difference can a User Group make for you?

At the monthly call, connect with other leaders and find out how community makes your experience even better.

Users online (2,429)