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 Apps / Parsing JSON and sorti...
Power Apps
Unanswered

Parsing JSON and sorting data by matching values

(1) ShareShare
ReportReport
Posted on by

I have this JSON Schema:

 

{
    "type": "array",
    "items": {
        "type": "object",
        "properties": {
            "name": {
                "type": "string"
            },
            "company": {
                "type": "object",
                "properties": {
                    "NAME": {
                        "type": "string"
                    }
                }
            }
        },
        "required": [
            "name",
            "company"
        ]
    }
}
 
In my power automate flow, I'd like to get all of these listed in a table. However, I'm trying to have it take all data from the "name" portion for each object, then have all of the objects with the matching company/name placed in a column.
 
For example, I'd like the first column to be company/name. Then the 2nd column to be the first name (the one in lowercase in my schema), then 3rd the next one with the same matching company/name, etc...
 
How can I accomplish this?
Categories:
I have the same question (0)
  • Sunil Pashikanti Profile Picture
    736 Moderator on at

    Hi @jhritz89

     

    Parse JSON Data:
    In your Power Automate flow, use the “Parse JSON” action to convert the JSON data into a usable format.
    Provide the JSON schema you’ve shared as the input to this action.


    Extract Names and Companies:
    Once you’ve parsed the JSON, you’ll have an array of objects.
    Create a loop (such as an “Apply to Each” action) to iterate through each object in the array.
    Within the loop, extract the “name” and “company” values from each object.


    Group Data by Company:
    Create a table (or collection) to store the grouped data.
    For each object, check if the company already exists in the table.
    If it does, add the name to the existing company’s row.
    If not, create a new row for that company and add the name.


    Sort Data:
    Sort the table by company (first column) and then by names (subsequent columns).

     

    Here’s a simplified example of how you might structure your table:

    Company/Name Name 1 Name 2 Name 3
    ABC Corp John Mary  
    XYZ Inc Alice Bob Carol

     

    Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

    Sunil Pashikanti - Tech Blog: PowerApps

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 Apps

#1
WarrenBelz Profile Picture

WarrenBelz 717 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 329 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard