Hi all,
I have a JSON as below and want e.g. the value for the second entry ("ID": "51979307"). How could I do that?
"Title": "Improvement Request",
"Options": [
{
"ID": "59961274",
"Type": "TextField",
"Title": "1. Nice to have you here! Give your improvement ticket a title. ",
"Value": "Test Ticket for Power Automate Flows",
"Required": true,
"Description": "",
"OrderNumber": "1.",
"DefaultValueEnabled": false
},
{
"ID": "51979307",
"Type": "TextBox",
"Title": "2. Describe your improvement suggestion/ request briefly. ",
"Value": "Description for Test Ticket for Power Automate Flows",
"Required": true,
"Description": "",
"OrderNumber": "2.",
"ExtraSettings": "PlaintText"
},
(...)
Solved! Go to Solution.
You can use Index integers in JSON to access a specific entry in an array. Assuming your JSON is in a Parse JSON something like this
Outputs('Parse JSON')?['Options'][1]?['ID']
I would use a filter array action to filter only the rows where checked = true from the Value array. Then you can access that value using the syntax in my previous post
body('Filter_array')[0]?['Name of key to retrieve']
You can use Index integers in JSON to access a specific entry in an array. Assuming your JSON is in a Parse JSON something like this
Outputs('Parse JSON')?['Options'][1]?['ID']
Thank you @Pstork1 !
Do you have any idea how to get value from the one below which is "true" ?
"ID": "66148365",
"Type": "Choice",
"Title": "3. What does your improvement ticket relate to?",
"Value": [
{
"key": 16904642,
"text": "D365",
"checked": false
},
{
"key": 75204053,
"text": "Teams",
"checked": false
},
{
"key": 6244205,
"text": "New non-standard equipment",
"checked": false
},
{
"key": 22950821,
"text": "New non-standard software license ",
"checked": false
},
{
"key": 31783402,
"text": "New solution (system, app, portal, etc.)",
"checked": false
},
{
"key": 90172441,
"text": "Other",
"checked": true
}
I would use a filter array action to filter only the rows where checked = true from the Value array. Then you can access that value using the syntax in my previous post
body('Filter_array')[0]?['Name of key to retrieve']
You'll probably need to do a Parse JSON first to gain access to the Checked column. I copied your JSON and ended up with this to get the key value for the entry where checked = true
May I ask you to copy and paste the schema which you used?
I just created a schema from the JSON. However, the JSON you posted is incomplete so I had to add a closing square bracket to close the array and an opening and closing brace to close the object. I assumed what you posted was a fragment of a larger JSON entry. What you posted isn't valid JSON. Here's what I changed it to.
{
"ID": "66148365",
"Type": "Choice",
"Title": "3. What does your improvement ticket relate to?",
"Value": [
{
"key": 16904642,
"text": "D365",
"checked": false
},
{
"key": 75204053,
"text": "Teams",
"checked": false
},
{
"key": 6244205,
"text": "New non-standard equipment",
"checked": false
},
{
"key": 22950821,
"text": "New non-standard software license ",
"checked": false
},
{
"key": 31783402,
"text": "New solution (system, app, portal, etc.)",
"checked": false
},
{
"key": 90172441,
"text": "Other",
"checked": true
}
]
}
User | Count |
---|---|
92 | |
45 | |
21 | |
18 | |
17 |
User | Count |
---|---|
142 | |
50 | |
43 | |
40 | |
31 |