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

Community site session details

Session Id : HbgrcbvXmWvWspJ9t5TWtq
Power Automate - Building Flows
Unanswered

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

Like (0) ShareShare
ReportReport
Posted on 12 Nov 2018 17:31:58 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.
I have the same question (0)
  • CU20081036-0 Profile Picture
    177 on 23 Jun 2020 at 13:16:14
    Re: Getting a list of the JSON Keys (Not the values) from a json object.

    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

  • v-yuazh-msft Profile Picture
    on 27 Nov 2018 at 09:22:40
    Re: Getting a list of the JSON Keys (Not the values) from a json object.

    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

     

  • Dramus Profile Picture
    17 on 13 Nov 2018 at 17:17:22
    Re: Getting a list of the JSON Keys (Not the values) from a json object.

    Found a way to do it with contains().

  • Dramus Profile Picture
    17 on 13 Nov 2018 at 14:12:26
    Re: Getting a list of the JSON Keys (Not the values) from a json object.

    That was my conclusion too.

     

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

     

     

  • v-yuazh-msft Profile Picture
    on 13 Nov 2018 at 09:52:47
    Re: Getting a list of the JSON Keys (Not the values) from a json object.

    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

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

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Telen Wang – Community Spotlight

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

Congratulations to the July Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Automate

#1
Tomac Profile Picture

Tomac 786 Moderator

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 724 Super User 2025 Season 2

#3
stampcoin Profile Picture

stampcoin 290 Super User 2025 Season 2

Last 30 days Overall leaderboard