cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
ajnunez
Level: Powered On

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
Super User
Super User

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!



View solution in original post

2 REPLIES 2
Super User
Super User

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!



View solution in original post

ajnunez
Level: Powered On

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

Better Together Contest Finalists Announced!

Congrats to the finalists of our ‘Better Together’-themed T-shirt design contest! Click for the top entries.

firstImage

Incoming: New and improved badges!

Look out for new contribution recognition badges coming SOON!

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!

sixthImage

Community Summit North America

The top training and networking event across the globe for Microsoft Business Applications

Top Solution Authors
Top Kudoed Authors
Users online (7,661)