I have SharePoint List field having Json value in it. I am parsing that json string through parsejson action with the power automate. Now I want to iterate through the JSON object to verify few key values if exists or not.
1 Answer
You've not provided your JSON input and output values for [Parse JSON] action in Power Automate, so not sure about the JSON structure.
Usually, a collection fed into [Parse JSON] will have an array called [results], which is the top level array. It may contain other nested arrays.
See an example of getting users from a SharePoint Group and processing the user collection using [Parse JSON] and [Apply to each] actions.
Sample input to [Parse JSON]
{
"d": {
"results": [
{
"Title": "Hello Lastisa",
"Email": "SomeEmail@contoso.com"
}
]
}
}
Schema used for [Parse JSON]
{
"type": "object",
"properties": {
"d": {
"type": "object",
"properties": {
"results": {
"type": "array",
"items": {
"type": "object",
"properties": {
"Title": {
"type": "string"
},
"Email": {
"type": "string"
}
},
"required": [
"Title",
"Email"
]
}
}
}
}
}
}
Use [Apply to each] for processing [results] array