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 / Getting a list of the ...
Power Automate
Unanswered

Getting a list of the JSON Keys (Not the values) from a json object.

(0) ShareShare
ReportReport
Posted on by 17

Trying to get a list out of planner of which labels have been applied to which tasks.

Planner returns the information as the following JSON object:

 

 
"appliedCategories": {
"category1": true,
"category3": true 
}
Labels that are not applied do not show up. Just the ones that are on the task.
 
I can't find a way to either:
  1. Get a list of the keys, or
  2. Find a way for the flow not to fail if a key doesn't exist.
Categories:
I have the same question (0)
  • v-yuazh-msft Profile Picture
    Microsoft Employee on at

    Hi @Dramus,

     

    I have made a test on my side and couldn't find a way to get a list of the JSON Keys from a json object.

    I afraid that there is no any way to get a list of the JSON Keys from a json object in microsoft flow currently.

     

    Best regards,

    Alice

  • Dramus Profile Picture
    17 on at

    That was my conclusion too.

     

    Maybe there is a way to use Filter Array and length() to see if the key exists.

     

     

  • Dramus Profile Picture
    17 on at

    Found a way to do it with contains().

  • v-yuazh-msft Profile Picture
    Microsoft Employee on at

    Hi @Dramus,

     

    If your problem has been solved, please go ahead to share your solutions and mark the post as solved by clicking “Accept as Solution” so that this thread will be marked for other users to easily identify!

     

    Best regards,

    Alice

     

  • CU20081036-0 Profile Picture
    183 on at

    Hi @Dramus,

     

    I have similar requirement and contains did not work for me. Could you please share the solution that worked for you? 

     

    I need to check if keys like  locationUri, locationType exist in the JSON response. 

     

    Condition contains(outputs('Invoke_an_HTTP_request'),'locationUri'did not help.

     

    JSON Response

    "location": {
    "displayName": "",
    "locationUri": "",
    "locationType": "conferenceRoom",
    "uniqueId": "",
    "uniqueIdType": "directory",
    "address": {
    "street": "",
    "city": "",
    "state": "",
    "countryOrRegion": "",
    "postalCode": ""
    },
    "coordinates": {}
    },
    "locations": [
    {
    "displayName": "",
    "locationUri": "",
    "locationType": "conferenceRoom",
    "uniqueId": "",
    "uniqueIdType": "directory",
    "address": {
    "street": "",
    "city": "",
    "state": "",
    "countryOrRegion": "",
    "postalCode": ""
    },
    "coordinates": {}
    }
    ],

    Thanks,

    SV

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Congratulations to the March Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Automate

#1
Haque Profile Picture

Haque 607

#2
Valantis Profile Picture

Valantis 340

#3
11manish Profile Picture

11manish 284

Last 30 days Overall leaderboard