Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

Reply
mukuljp
Frequent Visitor

Transform json list of record with dynamic keys to table

I'm getting a JSON response from an m-query with below format

 

 

 

 

const json = [
{
"id":"a",
"values":{"c":1,"d":"2","e":"3"}
},
{
"id":"b",
"values":{"f":4,"g":"5","h":"6"}
}
]

 

 

 

 

I want to convert this to table like below,

idkeyvalue
ac1
ad2
ae3
bf4
bg5
bh6

Can any one redirect me to a sample m query to transofm dynamic key value json objects maps

1 ACCEPTED SOLUTION
DataVitalizer
Solution Sage
Solution Sage

Hi @mukuljp 

 

After connecting your Json file, open the powerquery editor and follow these steps:

  1. Right select the column "id" and click Unpivot other columns
  2. Right Click second column "Attribute" and replace Values. by none

Did it work ? 👌 Mark it as a solution to help spreading knowledge 👉 A kudos would be appreciated

View solution in original post

2 REPLIES 2
mukuljp
Frequent Visitor

@DataVitalizer This works, Thanks for sharing

DataVitalizer
Solution Sage
Solution Sage

Hi @mukuljp 

 

After connecting your Json file, open the powerquery editor and follow these steps:

  1. Right select the column "id" and click Unpivot other columns
  2. Right Click second column "Attribute" and replace Values. by none

Did it work ? 👌 Mark it as a solution to help spreading knowledge 👉 A kudos would be appreciated

Helpful resources

Announcements
Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

Check out the October 2025 Power BI update to learn about new features.

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Solution Authors