Forum Discussion

jcawley's avatar
jcawley
Helper III
5 years ago
Solved

Parsing Multi-Dimensional Array from json API?

  Good morning everyone, So I need help trying to parse my json file from an API… I haven't been able to succesfully parse this into a table. I am receiving the following error: "Expressio...
  • Jimmy801's avatar
    Jimmy801
    5 years ago

    Hello jcawley 

     

    check out this solution. It converts the json to a table with two column, using the field "purchase_ids" from your api output

    let
        YourJson = "{""total_found"":3, ""purchase_ids"":{""444636"":""444636"", ""444637"":""444637"", ""444638"": ""444638""}}",
        ReadJson = Json.Document(YourJson),
        CreateTable = Record.ToTable(ReadJson[#"purchase_ids"])
    in
        CreateTable

     

    Copy paste this code to the advanced editor in a new blank query to see how the solution works.

    If this post helps or solves your problem, please mark it as solution (to help other users find useful content and to acknowledge the work of users that helped you)
    Kudoes are nice too

    Have fun

    Jimmy