cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
leighp
Frequent Visitor

Parse JSON into using values as key

Happy Wednesday,

 

I cannot figure out how to parse a JSON so that everything gets sorted by one of the values instead of the keys.

 

When I compose the values from Power BI, I get:

leighp_0-1661360017559.png

(GB Status, BB Status both have the values Certified, In Progress, and Not Started)

 

When I use Parse JSON I use this Schema but the output does not appear to change.

{
  "type": "array",
  "items": {
    "type": "object",
    "properties": {
      "GB Status": {
        "type": "string"
      },
      "BB Status": {
        "type": "string"
      },
      "User Manager Name": {
        "type": "string"
      },
      "User Full Name": {
        "type": "string"
      }
    },
    "required": [
      "User Manager Name",
      "User Full Name"
    ]
  }
}

leighp_1-1661360112714.png

 

How do I get it so that instead of having the statuses as separate columns, that the names are organized by their values?

I.E.

instead of 


GB Status     BB Status       Full Name       Manager Name
Certified       In Progress      Joe                  Jane
In Progress   Not Started       Frank            Jane
Certified        Certified          Jack                John

 

It comes out as


GB Certified    GB In Progress     BB Certified     BB In Progress     Not Started (Only GB)
Joe                   Frank                    Jack                 Joe                          NAME

Jack                  NAME                  NAME              NAME                     NAME                             

 

(I also want to export this to CSV)

0 REPLIES 0

Helpful resources

Announcements
Power Automate News & Announcements

Power Automate News & Announcements

Keep up to date with current events and community announcements in the Power Automate community.

Power Automate Community Blog

Power Automate Community Blog

Check out the latest Community Blog from the community!

Top Solution Authors
Users online (5,227)