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 :
Power Automate - Building Flows
Unanswered

Parse an Array?

(0) ShareShare
ReportReport
Posted on by 170

I need the value of the location.  If I parse this, I get an error saying the input is an array and should be an object

MaryT0905_0-1640809105929.png

 

I have the same question (0)
  • tom_riha Profile Picture
    10,179 Most Valuable Professional on at
    Re: Parse an Array?

    Hello @MaryT0905 ,

    it's an array, therefore, you must process it as an array first = add 'Apply to each' to loop through all the items and then extract the "locations".

    Or if it's always only a single item, you can use the first(..) expression to process the array and extract the value, e.g.

    first(<the array>)?['locations']
  • vikulkar Profile Picture
    on at
    Re: Parse an Array?

    @MaryT0905 ,

    Please try passing the entire Array in the 'Generate from sample' in the Parse JSON action which will produce the JSON in the form:

    {
        "type""array",
        "items": {
            "type""object",
            "properties": {
                "locations": {
                    "type""string"
                }
            },
            "required": [
                "locations"
            ]
        }
    }

    CommunityScreenshot2.png

    The location can be parsed as shown in the above flow.

     

    Thanks and Regards,

    Vikas K

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…

Chiara Carbone – Community Spotlight

We are honored to recognize Chiara Carbone as our Community Spotlight for November…

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 614 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 401 Moderator

#3
chiaraalina Profile Picture

chiaraalina 282

Last 30 days Overall leaderboard