cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Regular Visitor

Reference JSON items

Hi all I am fairly new to this subject and in need of help. 

 

I am trying to create an item from some JSON I recieve as a response but cannot reference specific items. 

 

{
  "eventNotifications": [
    {
      "realmId": "4620816365001552390",
      "dataChangeEvent": {
        "entities": [
          {
            "name": "Estimate",
            "id": "264",
            "operation": "Create",
            "lastUpdated": "2019-08-04T20:07:39.000Z"
          }
        ]
      }
    }
  ]
}

 

For this I need to reference the id of the above for my sandbox example. Any ideas how I can do this? Please let me know if I need to provide more details, thanks everyone.

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Super User III
Super User III

Re: Reference JSON items

Hi @ajnunez ,

 

Pass your JSONText as Content parameter for the Parse JSON step.

Under the Schema copy your JSON schema text.

 

Next step declare a variable as text and value expression as below.

body('Parse_JSON')['eventNotifications'][0]['dataChangeEvent']['entities'][0]['id']

 

See below screenshot

js1.png

 

js2.png

 

 

Here are my test results.

js3.png

 

If this reply has answered your question or solved your issue, please mark this question as answered. Answered questions helps users in the future who may have the same issue or question quickly find a resolution via search. If you liked my response, please consider giving it a thumbs up.

 

Thanks

 



Did I answer your question? Mark my post as a solution!

If you liked my response, please consider giving it a thumbs up


Proud to be a Flownaut!

Learn more from my blog

View solution in original post

2 REPLIES 2
Highlighted
Super User III
Super User III

Re: Reference JSON items

Hi @ajnunez ,

 

Pass your JSONText as Content parameter for the Parse JSON step.

Under the Schema copy your JSON schema text.

 

Next step declare a variable as text and value expression as below.

body('Parse_JSON')['eventNotifications'][0]['dataChangeEvent']['entities'][0]['id']

 

See below screenshot

js1.png

 

js2.png

 

 

Here are my test results.

js3.png

 

If this reply has answered your question or solved your issue, please mark this question as answered. Answered questions helps users in the future who may have the same issue or question quickly find a resolution via search. If you liked my response, please consider giving it a thumbs up.

 

Thanks

 



Did I answer your question? Mark my post as a solution!

If you liked my response, please consider giving it a thumbs up


Proud to be a Flownaut!

Learn more from my blog

View solution in original post

Highlighted
Regular Visitor

Re: Reference JSON items

@abmThank you so much for the quick response and effort into the example this is exactly what I needed. 

 

Thanks again

Helpful resources

Announcements
firstImage

Super User Program Update

Three Super User rank tiers have been launched!

firstImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

firstImage

New & Improved Power Automate Community Cookbook

We've updated and improved the layout and uploading format of the Power Automate Cookbook!

thirdimage

Power Automate Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

Top Solution Authors
Top Kudoed Authors
Users online (10,386)