Forum Discussion

ukantkumar's avatar
ukantkumar
Helper I
7 years ago
Solved

rest api json issue column issue

I am calling rest API in power bi desktop, and I am getting JSON response but the problem is Each key and value pair coming Separate separate column, but I need to convert in the table ?? how ?? 
  • DataChant's avatar
    DataChant
    7 years ago
    I will try to explain the fix using the UI of Power Query Editor first to make it easier. Let me know if it works.
    1- In Applied Steps, delete the Changed Type step.
    2- Open Advanced Editor
    3- in the line that starts with “Source =“, delete “CSV.Document(“ and then delete the second argument of CSV.Document. In other words, keep only the Web.Contents function followed by the comma at the end.
    4- Don’t make the change in the formula bar. Only in Advanced Editor.
    5- In the preview pane you should now see a web file icon. Right click it and in the shortcut menu select Json.
    6- Drill down to the record object of the “Item” field.
    7- Convert the list into a table.
    8- Expand Column1.