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 / Get list of properties...
Power Automate
Unanswered

Get list of properties from custom object

(0) ShareShare
ReportReport
Posted on by 2

I am building a flow that has a custom object with, let's say, the following data in json:

 

{
"foo": "a",
"bar": "b",
"baz": 100
}

 

This json comes from a Web API and may change depending on what is being sent. I wanted to know if there is a way to extract the list of properties to loop over. I.E, in this case I would have a list of Text ["foo", "bar", "baz"]

 

 

I have the same question (0)
  • Henrik_M Profile Picture
    2,021 Super User 2024 Season 1 on at

    I'm not sure if there is a way to extract the property names from the object, put I guess you could use a regex "hack" to grab them from the JSON string. Try pasting this into your desktop flow:

    SET JSON TO $'''{
    \"foo\": \"a\",
    \"bar\": \"b\",
    \"baz\": 100
    }'''
    Text.ParseText.RegexParse Text: JSON TextToFind: $'''(?<=\").+?(?=\":)''' StartingPosition: 0 IgnoreCase: False Matches=> Matches

     

  • tfitzger Profile Picture
    2 on at

    Thanks, @Henrik_M . I have something like that already in place, but I was curious if there was something less hacky. Ah well.

  • anp882 Profile Picture
    10 on at

    I tried the following in a condition and an object assigned to a variable
    This:
    variables('YourVariable')?['YourProperty'] is equal to null
    was not evaluating to true, even when property didn't exist. But this:
    empty(variables('YourVariable')?['YourProperty']) is equal to true
    was working fine.

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

Congratulations to the July Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Automate

#1
David_MA Profile Picture

David_MA 266 Super User 2026 Season 2

#2
trice602 Profile Picture

trice602 160 Super User 2026 Season 2

#3
11manish Profile Picture

11manish 134 Super User 2026 Season 2

Last 30 days Overall leaderboard