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

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / How to get child value...
Power Automate
Unanswered

How to get child values corresponding to specific Parent using json

(1) ShareShare
ReportReport
Posted on by 40
Hi All,
 
Source (Input Data):
Original data has columnar wise,
Column1, Column2, Column3, Column4, Column5, Type, SubType, Sales
 
After used json with xpath expression getting data in the below structure, but still Column4.
 
Expected: 
Below is the expected output based on the "Original data" (input) that is coming.
I have scenario where on top I want to show all different column values and below it should show child values related to specific Column (Parent).
 
Name                 Sales
Column1             100
Column2             100
Column3             100
Column4             100
Column5             100
      Type1             50
       Subtype1       25
       Subtype2       25
      Type2             50
        Subtype1      35
        Subtype2      15

So till "Column5" I was able to achieve the values what is expected using json and inside json have used xpath expressions, but got stuck from Type1, Type2 of Column5. Any help/suggestions are really appreciated. 
  I am looking for xpath expression where it should fetch the child (ex: Type/SubType) values related to Parent (ex: Column5). 
 
Thanks in advance.
Categories:
I have the same question (0)
  • Suggested answer
    trice602 Profile Picture
    15,402 Super User 2025 Season 2 on at
    Hi,
     
    This is not xpath but I can get the values with parse JSON and a compose.  Hope this helps!
     
     
     
     
    ------------------------------------------------


    If this was helpful, please like and/or mark as a verified answer to help others find this too!


    Always glad to help! 💯💯💯💯💯

    Tom 

    Follow me on LinkedIn - Thomas Rice, PMP | LinkedIn

     


     
  • KC-25101625-0 Profile Picture
    40 on at
    Ok, could you please provide detailed steps so that I will check/test it from my end. Hope it works.

    Ultimately I want to export this data to csv/excel. 
     
    Thanks in advance. 
  • Suggested answer
    trice602 Profile Picture
    15,402 Super User 2025 Season 2 on at
    Hi,
     
    Not sure what else I can add that I haven't already shown in the example below.  So I have my data in a json object and I use parse json, shown below. 
     
     
    Next I enter this expression to get the values for Column5 Type1
     
     
    Expanding on this, I copied my Compose and changed Type1 to Type2 and captured those values.
     
     
    To summarized, I have a parse json and two compose actions.
     
    ------------------------------------------------


    If this was helpful, please like and/or mark as a verified answer to help others find this too!


    Always glad to help! 💯💯💯💯💯

    Tom 

    Follow me on LinkedIn - Thomas Rice, PMP | LinkedIn

     


     
  • KC-25101625-0 Profile Picture
    40 on at
    Hi,
     
    The values getting as part of Type field (eg: Type1, Type2) and Subtype (Subtype1, Subtype2) are dynamic. Sometimes I will get 2 types or sometimes 100 types so the solution should be dynamic. Could you please suggest the same and provide the detailed steps from using all the Column1 to Type/SubType.
     
    Based on the inputs as you suggested, I have implemented the same, but getting an error:
     


  • KC-25101625-0 Profile Picture
    40 on at
    Hi,
    Any suggestions or steps.
  • trice602 Profile Picture
    15,402 Super User 2025 Season 2 on at
    Hey there!
     
    I am following up on this post how to get child values corresponding to specific parent using json in this category building flows from 11/07/2024.  I know the post is a little older, but it is a common question here so wanted to take a moment and follow-up. I see there have been 5 replies and 1 likes and asking if your question has been answered.  If so, please help the community out by completing one or more of the following actions!  Thanks in advance!
     
    Easy as 1-2-3 ‼️💯⭐😎🆒🙏
     
    1) Mark a reply as a verified answer - this is essential, and it helps others with the same general question find this thread. ✅
    2) You can also mark one of more replies as a verified answer.  Please take a moment and give the author credit for volunteering their time. ✌️
    3) Like one or more replies.  Kudos always greatly appreciated! 👍
     
    Pro tip:  if you found your own solution or workaround, feel free to add a reply to your own post and mark it as the solution too!  The goal is to get this thread marked with a verified answer by anyone that finds one or more replies helpful!
     
    Again, thanks in advance for reading and responding, always glad to help!  Tom 💯💯💯💯💯
  • trice602 Profile Picture
    15,402 Super User 2025 Season 2 on at
    If I can help with anything else please let me know or tag me in a future post, I enjoy reading and answering questions.  Always glad to help!  Tom 💯💯💯💯💯

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

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 522 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 364 Moderator

#3
abm abm Profile Picture

abm abm 243 Most Valuable Professional

Last 30 days Overall leaderboard