web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / How to dynamicaly acce...
Power Automate
Unanswered

How to dynamicaly access a section of JSON

(0) ShareShare
ReportReport
Posted on by 20

With the JSON below, I am trying to get the dataset and table values.  (This is only the code that is needed. "..." is unimportant code)

Variable('FlowDetail')

{

"headers": {...},

"body": {

"name": "01023adf-xxxx-xxxx-xxxx-xxxxxxxxxxxxx",

...

"properties": {

"displayName": "ColCal - Master Col Calendar WF v1",

"userType": "Owner",

"definition": {

...

"triggers": {

"When_an_item_is_created_or_modified": {

...

"inputs": {

...

"parameters": {

"dataset": "https://xxxxxxxxxxxxxxxxxxxx",

"table": "01023adf-xxxx-xxxx-xxxx-xxxxxxxxxxxxx"

},

...

}

}

(Lots more code but not important)

----------------

So to get the value for dataset I use the following expression:

Variable('FlowDetail')?['body']?['properties']?['triggers']?['When_an_item_is_created_or_modified']?['inputs']?['parameters']?['dataset']

BUT: When_an_item_is_created_or_modified  is not a constant.  I am getting the detail on all my flows and the name of the tirgger step is different each time.

What do I do?

 

What I did - but ran into a dead end...  (even if there is a different solution for the above - I still want to know this...)

I constructed a string in a compose that contains the extension code, but I can't figure out how to convert the string into an expression...

2022-12-29_09-48-13 String to Expression.png

 

Categories:
  • lbendlin Profile Picture
    8,726 Super User 2026 Season 1 on at

    Any particular reason for not using the built-in Parse JSON action?

     

    Power Automate Parse JSON Action Guide | When & How To Use (zeitgeistcode.com)

  • CFlorian Profile Picture
    20 on at

    Not sure how to code it to get that value?  or the two sub values.

  • lbendlin Profile Picture
    8,726 Super User 2026 Season 1 on at

    Would you be able to post a sample sanitized version of the JSON?

  • DamoBird365 Profile Picture
    8,942 Microsoft Employee on at

    Hey @CFlorian 

     

    You can construct an expression with a dynamic value from another action, like a compose with an object or the output of another action.  Take a look at the following video https://youtu.be/PD980sKKx0E


    Cheers
    Damien

    Please take a look and subscribe to my YouTube Channel for more Power Platform ideas and concepts. Thanks

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Leaderboard > Power Automate

#1
Mohsin Ali Profile Picture

Mohsin Ali 377

#2
11manish Profile Picture

11manish 302 Super User 2026 Season 2

#3
Henil Profile Picture

Henil 130

Last 30 days Overall leaderboard