web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Automate
Answered

Problem parsing JSON

(0) ShareShare
ReportReport
Posted on by 431

I have a variable "result":  in set variable that looks like this:

%AnswerCustomObject['choices'][0]['message']['content']%.

The value looks is: 

{
"case_number": "1111-2222",
"case_title": "xxx COUNTY, ET AL VS. yyy, ET AL",
}

 

I have another variable CaseNumber Which in set variable is:

%result['case_number']%

I get an error : result doesn't have a property case_number

How do I extract case_number from result?

 

 

 

  • Nived_Nambiar Profile Picture
    18,138 Super User 2026 Season 1 on at

    Hi @Steve48 

     

    I think first convert the result variable to custom object like using the below action

    Nived_Nambiar_0-1695561844563.png

     

    The output of the action convert it into custom object from its output you can select case_number property 🙂

     

    Thanks & Regards,

    Nived N 🚀

    LinkedIn: Nived N's LinkedIn
    YouTube: Nived N's YouTube Channel

    🔍 Found my answer helpful? Please consider marking it as the solution!
    Your appreciation keeps me motivated. Thank you! 🙌

  • Agnius Bartninkas Profile Picture
    Most Valuable Professional on at

    If the parent object is already converted and values are accessible, any child objects are also converted automatically. No need to convert it again.

     

    @Steve48 , can you share a screenshot of the variable value during runtime?

  • Steve48 Profile Picture
    431 on at

    Yes, The parent object is already converted. I am trying to extract the individual items from AnswerCustomObject such as case_number, case_title, etc. I am having trouble targeting them. My latest attempt is:

    %AnswerCustomObject['choices'][0]['content']['case_number']%

    Steve48_0-1695563014983.png

     

  • Nived_Nambiar Profile Picture
    18,138 Super User 2026 Season 1 on at

    Hi @Steve48 

     

    does the below expression as you said above worked for you then ?

     

    AnswerCustomObject['choices'][0]['message']['content']['case_number']

  • Steve48 Profile Picture
    431 on at

    No, didn't work

  • Verified answer
    Nived_Nambiar Profile Picture
    18,138 Super User 2026 Season 1 on at

    @Nived_Nambiar wrote:

    Hi @Steve48 

     

    I think first convert the result variable to custom object like using the below action

    Nived_Nambiar_0-1695561844563.png

     

    The output of the action convert it into custom object from its output you can select case_number property 🙂

     

    Thanks & Regards,

    Nived N 🚀

    LinkedIn: Nived N's LinkedIn
    YouTube: Nived N's YouTube Channel

    🔍 Found my answer helpful? Please consider marking it as the solution!
    Your appreciation keeps me motivated. Thank you! 🙌


     

    Did you tried this  @Steve48 on result variable and then tried to extract the property ?

     

     

  • Steve48 Profile Picture
    431 on at

    @Nived_Nambiar 

    Hi Nived. Thank you. I tried your suggestion and it worked! What I don't understand is that result was the value of AnswerCustomObject so since I already had a JsonCustomObject, why did I need to create another one. Why couldn't I work directly with AnswerCustomObject. In any case I will mark your answer as the solution.

    Steve48_0-1695572281547.png

     

  • Nived_Nambiar Profile Picture
    18,138 Super User 2026 Season 1 on at

    Hi @Steve48 

     

    From my understanding the data type of %AnswerCustomObject['choices'][0]['message']['content']% is different, it is not json, it may be text so may be that would be a reason why the property wasn't possible when you are directly retriving it. That is why a simple conversion was needed there 🙂

     

    I will also ask @Agnius  to share his views on it 🙂

     

     

    Thanks & Regards,

    Nived N 🚀

    LinkedIn: Nived N's LinkedIn
    YouTube: Nived N's YouTube Channel

    🔍 Found my answer helpful? Please consider marking it as the solution!
    Your appreciation keeps me motivated. Thank you! 🙌

  • Agnius Bartninkas Profile Picture
    Most Valuable Professional on at

    It seems like it is a JSON string that was not part of it when the object was created. @Steve48 , how exactly is the %AnswerCustomObject% created in your flow?

  • Steve48 Profile Picture
    431 on at

    Hi @Agnius Here is a screenshot that shows how %AnswerCustomObject% was created

    Steve48_0-1695674262671.png

     

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

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the July Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Automate

#1
David_MA Profile Picture

David_MA 229 Super User 2026 Season 2

#2
11manish Profile Picture

11manish 223 Super User 2026 Season 2

#3
Valantis Profile Picture

Valantis 136 Super User 2026 Season 2

Last 30 days Overall leaderboard