web
You’re offline. This is a read only version of the page.
close
Skip to main content
Community site session details
Power Automate - Building Flows
Answered

Parse dynamic JSON

Like (0) ShareShare
ReportReport
Posted on 2 Nov 2023 20:28:54 by 274

I need to extract the list of property names from a dynamic json string. The following is a simplified version. How can I get an array of ["xxxxxxx","zzzzzzzzzzzzz"]

{
    "xxxxxxx": {
        "property redacted": "removed"
    },
    "zzzzzzzzzzzzz": {
        "content redacted": "removed"
    }
}
  • Verified answer
    Chriddle Profile Picture
    7,936 Super User 2025 Season 2 on 03 Nov 2023 at 17:10:38
    Re: Parse dynamic JSON

    Don't do this with string operations ðŸ˜£

     

    Chriddle_0-1699031000267.png

    Compose: Your flow's JSON

    Select From:

    xpath(
    	xml(json(concat('{"root":', outputs('Compose'),'}}'))),
    	'/root/*'
    )

    Select Map:

    xpath(
    	item(),
    	'name(/*)'
    )

    Only downside: You might have to handle XML encoding of characters that are not allowed as node names.

     

     

    Output:

    Chriddle_1-1699031122469.png

     

Helpful resources

Quick Links

Telen Wang – Community Spotlight

We are honored to recognize Telen Wang as our August 2025 Community…

Announcing our 2025 Season 2 Super Users!

A new season of Super Users has arrived, and we are so grateful for…

Congratulations to the July Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Automate

#1
Tomac Profile Picture

Tomac 986 Moderator

#2
stampcoin Profile Picture

stampcoin 699 Super User 2025 Season 2

#3
Riyaz_riz11 Profile Picture

Riyaz_riz11 577 Super User 2025 Season 2

Loading complete