Forum Discussion
How to import all columns from a JSON when not all the objects have the same keys
- 1 year ago
Anonymous ,
Here are a few steps you can follow.
-
Load JSON: Go to Data > Get Data > From File > From JSON and load your file.
-
Convert to Table: Click To Table in Power Query.
-
Expand Columns: Use the Expand Column button (next to the column name). Missing keys will appear as null.
-
Handle Missing Keys: If a key (e.g., ciudad) is not in all objects, it will still create a column with null for missing values.
-
Load to Excel: Click Close & Load to return the data to Excel.
This ensures all potential columns are imported, including those with missing keys.
-
Hi Anonymous
I wanted to check if you had the opportunity to review the information provided. Please feel free to contact us if you have any further questions. If my response has addressed your query, please accept it as a solution and give a 'Kudos' so other members can easily find it.
Thank you.