Skip to main content

Notifications

Power Automate - General Discussion
Unanswered

Parsing the first and only record in a GET / ParseJSON back without loop

(1) ShareShare
ReportReport
Posted on by 2
Hi Guys,
 
Been a couple of days on this one and its starting to drive me bananas.  For background, my skill levels here are pretty low!!
 
I have a JSON GET request that only returns 1 items from an API and passes the data into a Parse JSON. The schema is later in this message. 
 
I am trying to reference the items (e.g. firstName, lastName) etc directly in the Respond to Powerapp Operation... but for some reason I cannot get this to work.  The only way I have had success is to Initialise a Variable, then go into a Apply Each loop to then set the variable before exiting the loop and Responding to the Powerapp.
I have tried approaches such as below, but none have as yet worked:

body('Parse_JSON')[0]['firstName']
first(body('Parse_JSON')['firstName'])
etc
 
Any help of assistance is very much appreciated...!
 
 
The schema for the JSON is below:
{
    "type": "object",
    "properties": {
        "meta": {
            "type": "object",
            "properties": {
                "count": {
                    "type": "integer"
                },
                "total": {
                    "type": "integer"
                },
                "limit": {
                    "type": "integer"
                },
                "offset": {
                    "type": "integer"
                }
            }
        },
        "members": {
            "type": "array",
            "items": {
                "type": "object",
                "properties": {
                    "firstName": {
                        "type": "string"
                    },
                    "lastName": {
                        "type": "string"
                    },
                    "number": {
                        "type": "string"
                    },
                    "accountCredit": {
                        "type": "number"
                    },
                    "amountOwing": {
                        "type": "integer"
                    },
                    "age": {
                        "type": [
                            "integer",
                            "string"
                        ]
                    },
                    "id": {
                        "type": "string"
                    }
                },
                "required": [
                    "firstName",
                    "lastName",
                    "number",
                    "accountCredit",
                    "amountOwing",
                    "age",
                    "id"
                ]
            }
        }
    }
}
Categories:
  • TomMoody Profile Picture
    TomMoody 113 on at
    Parsing the first and only record in a GET / ParseJSON back without loop
    Please can you illustrate this part with screenshots so we can see details of your flow?
     
    'I am trying to reference the items (e.g. firstName, lastName) etc directly in the Respond to Powerapp Operation... but for some reason I cannot get this to work.  The only way I have had success is to Initialise a Variable, then go into a Apply Each loop'

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

Microsoft Kickstarter Events…

Register for Microsoft Kickstarter Events…

Announcing Our 2025 Season 1 Super Users!

A new season of Super Users has arrived, and we are so grateful for the daily…

Announcing Forum Attachment Improvements!

We're excited to announce that attachments for replies in forums and improved…

Leaderboard

#1
WarrenBelz Profile Picture

WarrenBelz 145,495

#2
RandyHayes Profile Picture

RandyHayes 76,287

#3
Pstork1 Profile Picture

Pstork1 64,822

Leaderboard