Skip to main content

Notifications

Community site session details

Community site session details

Session Id :
Power Automate - Building Flows
Unanswered

How to get the elements from a JSON object

(0) ShareShare
ReportReport
Posted on by 143

Hi All, 

 

I am trying to get a string value from within a JSON object that I receive. I would like to have have a string after the ParseJSON step which shows the product names - "Product Name A;Product Name B;Product Name C;Product Name D"

 

 

[
 {
 "CustomerName": "Customer A",
 "DocumentType": "Word",
 "Product": [
 {
 "Value": "Product Name A"
 },
 {
 "Value": "Product Name B"
 },
 {
 "Value": "Product Name C"
 },
 {
 "Value": "Product Name D"
 }
 ]
 }
]

 

 

  • Ellis Karim Profile Picture
    11,105 Super User 2025 Season 1 on at
    Re: How to get the elements from a JSON object

    The demo flow I posted does not need the Parse JSON action. It uses an expression to "grab" the Product array.

     

    Place your data in to the varJSON variable: 

     

    Snag_9bd5f96.png

     

    However, if you still need to use the Parse JSON function, then modify the expression in the Select action to: 
    body('Parse_JSON')?[0]?['Product']

     

    Snag_9bf66a1.png


    Ellis
    ____________________________________
    If I have answered your question, please mark the post as Solved.
    If you like my response, please give it a Thumbs Up.

  • Dhiran Profile Picture
    143 on at
    Re: How to get the elements from a JSON object

    Hi @ekarim2020 

     

    Thank you for your answer and I tried your steps but had no success 😞

     

    I also look at the raw output of my ParseJSON step and it also had the word body at the head of of the object. I assumed I could just reference the using this expression "outputs('ParseJSON')?['body']?['Product'] but that also failed.

     

     

     

    {
     "body": [
     {
     "CustomerName": "Customer Name",
     "DocumentType": "Word"
     "Product": [
     {
     "Value": "Product A"
     },
     {
     "Value": "Product B"
     },
     {
     "Value": "Product C"
     },
     {
     "Value": "Product D"
     }
     ]
     }
     ]
    }

     

     

  • Ellis Karim Profile Picture
    11,105 Super User 2025 Season 1 on at
    Re: How to get the elements from a JSON object

    Hi @Dhiran ,

     

    We can use the Select and Join actions to create the string.

    Snag_505645d.png

    (2) We can use the Select action Product property. We use the Select action to select the first item (0) of the varJSON array variable, and then specify the Product property - which is also an array. The expressions are shown below:

    Snag_5047190.png

    The output of the Select action is an array of product names:

     

    [
     "Product Name A",
     "Product Name B",
     "Product Name C",
     "Product Name D"
    ]

     

     

    (3) Finally, we can join all the product names together using the Join action

    Snag_504a775.png

    The output of the Join action is:

     

    Product Name A;Product Name B;Product Name C;Product Name D

     


    Ellis
    ____________________________________
    If I have answered your question, please mark the post as Solved.
    If you like my response, please give it a Thumbs Up.

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

Paul Stork – Community Spotlight

We are honored to recognize Paul Stork as our July 2025 Community…

Congratulations to the June Top 10 Community Leaders!

These are the community rock stars!

Announcing the Engage with the Community forum!

This forum is your space to connect, share, and grow!

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 497 Super User 2025 Season 1

#2
David_MA Profile Picture

David_MA 436 Super User 2025 Season 1

#3
Riyaz_riz11 Profile Picture

Riyaz_riz11 244 Super User 2025 Season 1