1

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 1

1

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.

enter image description here

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

enter image description here

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.