Skip to main content

Notifications

Power Automate - Using Connectors
Answered

Cant read second property of object

(0) ShareShare
ReportReport
Posted on by 15

Hi everyone, 

 

currently building a flow that needs to grab information from an object, but ive found that JSON PARSE isnt getting information from the second property onward, is there a problem with my JSON?

 

getting more specific, the Parse JSON correctly validates the object, when I change "label" too an integer it fails, but it fails in conditions and when put into compose it input and outputs an empty html page.

 

screenshots are simplified for testing but cause the same error.

 

jelittle_0-1679061448443.png

jelittle_1-1679061771283.png

this is the JSON Schema:

{
    "type""object",
    "properties": {
        "ItestName": {
            "type""object",
            "properties": {
                "id": {
                    "type""integer"
                },
                "label": {
                    "type""string"
                }
            }
        }
    }
}

 

 

  • Verified answer
    jelittle Profile Picture
    jelittle 15 on at
    Re: Cant read second property of object

    Hi @Sundeep_Malik,

     

    error turned out to be a simple blindness, I have glasses now, The error in the original schema was an that there was an extra '.' in the "label" string, so it was calling for "label" instead of ".label".

     

    in my test example, "ItestName" should be 'testName", very unlucky on my end that I managed to miss the typo. 

    I would be intrigued to know why the flow was still verifying the schema properly, but wasn't able to use the data.

     

    Thanks for the help either way! 

  • Sundeep_Malik Profile Picture
    Sundeep_Malik 6,480 on at
    Re: Cant read second property of object

    Hey @jelittle 

     

    Not sure this will fix your problem or not, but in schema you can write the type of label to string and integer both.

    So make this change to your schema:

     

    {
    "type": "object",
    "properties": {
    "ItestName": {
    "type": "object",
    "properties": {
    "id": {
    "type": "integer"
    },
    "label": {
    "type": ["string","integer"]
    }
    }
    }
    }
    }

     

    Hopefully this works 🙂

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,636

#2
RandyHayes Profile Picture

RandyHayes 76,287

#3
Pstork1 Profile Picture

Pstork1 64,942

Leaderboard

Featured topics