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

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / Accessing values in js...
Power Automate
Unanswered

Accessing values in json object

(0) ShareShare
ReportReport
Posted on by 23

Hello, 

 

Could anyone tell/teach me how to access the 'values' section(s) of the below JSON using Microsoft Flow?

 

I want to parse the values of "name" and "id" (e.g. 'London' and 'LON' and 'Hamlets' and 'HAM') to variables so I can use them in another part of the flow. 

 

I've highlighted the specific parts in red. 

 

Thank you 🙂

 

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

 

{
	"version": "1.0",
	"session": {
		"new": true,
		"sessionId": "removed",
		"application": {
			"applicationId": "removed"
		},
		"user": {
			"userId": "removed"
		}
	},
	"context": {
		"System": {
			"application": {
				"applicationId": "removed"
			},
			"user": {
				"userId": "removed"
			},
			"device": {
				"deviceId": "removed",
				"supportedInterfaces": {}
			},
			"apiEndpoint": "removed",
			"apiAccessToken": "removed"
		}
	},
	"request": {
		"type": "Request",
		"requestId": "removed",
		"timestamp": "2019-07-04T10:01:07Z",
		"locale": "en-GB",
		"intent": {
			"name": "removedname",
			"confirmationStatus": "NONE",
			"slots": {
				"varMainGroup": {
					"name": "varMainGroup",
					"value": "London",
					"resolutions": {
						"resolutionsPerAuthority": [{
							"authority": "removed",
							"status": {
								"code": "ER_SUCCESS_MATCH"
							},
							"values": [{
								"value": {
									"name": "London",
									"id": "LON"
								}
							}]
						}]
					},
					"confirmationStatus": "NONE",
					"source": "USER"
				},
				"varSubArea": {
					"name": "varSubArea",
					"value": "HAMLETS",
					"resolutions": {
						"resolutionsPerAuthority": [{
							"authority": "removed",
							"status": {
								"code": "ER_SUCCESS_MATCH"
							},
							"values": [{
								"value": {
									"name": "HAMLETS",
									"id": "HAM"
								}
							}]
						}]
					},
					"confirmationStatus": "NONE",
					"source": "USER"
				}
			}
		}
	}
}

 

Categories:
I have the same question (0)
  • Verified answer
    Pstork1 Profile Picture
    68,697 Most Valuable Professional on at

    To do this you will use a Parse Json action in the Flow.  Follow these steps.

    1. Add a Parse Json action to the Flow.  Create the Schema by inputting your sample schema into the action using the Use sample payload to generate schema link. Then add the JSON into the Content field.
    2. To get at your values you'll need to go through several layers since the records are nested
      1. Add an Apply to Each loop and load resolutionsPerAuthority from dynamic content
      2. Add an Apply to Each loop inside that loop and load values
    3. You should now have access to name and id as strings inside that nested loop.
  • pwapp Profile Picture
    23 on at

    Hi @Pstork1,

     

    Spot on, worked first time thanks. I'm not entirely sure how it works but gets the result I needed thank you. 🙂

  • Pstork1 Profile Picture
    68,697 Most Valuable Professional on at

    Its because the JSON has nested records in it.  There is also a way to use index values to get at individual items, but I figured you wanted all of them.

  • SkytransICT Profile Picture
    2 on at

    HI PStork, hoping you may still be in action - not sure what you mean by "Add JSON into the Content" - that field seems single line - If I paste the whole JSON into that the page just hangs.

    You also mention "use index values to get at individual items" - would you be so kind as to expand on this? I have a fairly large JSON file (as a result of AI form recognition) that I need to pick values out of to create multiple Sharepoint list entries. I guess I'm hoping there's something akin to CSS Selectors I can use.

    thanks in advance

     

    Steven

  • Pstork1 Profile Picture
    68,697 Most Valuable Professional on at

    Please post this as a new question.  You'll get more responses and others will be able to find the answer more easily later.

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

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 522 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 364 Moderator

#3
abm abm Profile Picture

abm abm 243 Most Valuable Professional

Last 30 days Overall leaderboard