Quantcast
Channel: Power Query topics
Viewing all articles
Browse latest Browse all 31403

Cannot seem to figure out this JSON structure

$
0
0

I'm trying to build a specific table out of a specific JSON API but can't seem to figure it out with this specific structure.

https://api.opencorporates.com/v0.4/jurisdictions

It lists all the jurisdictions they have and I want to get them in excel in the following structure

 

code1 name1 country1 full_name1

code2 name2 country2 full-name2

etc...

 

IF anyone could figure out what's wrong with this code?

let
    Source = Json.Document(Web.Contents("https://api.opencorporates.com/v0.4/jurisdictions")),
    results = Source[results],
    jurisdictions1 = results[jurisdictions],
    #"Converted to Table" = Record.ToTable(jurisdictions1),
    #"Expanded Value" = Table.ExpandListColumn(#"Converted to Table", "Value"),
    #"Expanded Value1" = Table.ExpandRecordColumn(#"Expanded Value", "Value", {"code", "name", "country"})
in
    #"Expanded Value1"

Viewing all articles
Browse latest Browse all 31403

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>