gistfile1.txt
let
Source = Json.Document(Web.Contents("https://market.fuzzwork.co.uk/aggregates/?region=10000002&types="&Text.Combine(Table.ToList(Table.TransformColumnTypes(Table.SelectRows(Excel.CurrentWorkbook(){[Name="typelist"]}[Content], each ([Column1] <> null)),{{"Column1", type text}})),","))),
#"Converted to Table" = Record.ToTable(Source),
#"Expanded Value" = Table.ExpandRecordColumn(#"Converted to Table", "Value", {"buy", "sell"}, {"Value.buy", "Value.sell"}),
#"Expanded Value.buy" = Table.ExpandRecordColumn(#"Expanded Value", "Value.buy", {"weightedAverage", "max", "min", "stddev", "median", "volume", "orderCount", "percentile"}, {"Value.buy.weightedAverage", "Value.buy.max", "Value.buy.min", "Value.buy.stddev", "Value.buy.median", "Value.buy.volume", "Value.buy.orderCount", "Value.buy.percentile"}),
#"Expanded Value.sell" = Table.ExpandRecordColumn(#"Expanded Value.buy", "Value.sell", {"weightedAverage", "max", "min", "stddev", "median", "volume", "orderCount", "percentile"}, {"Value.sell.weightedAverage", "Value.sell.max", "Value.sell.min", "Value.sell.stddev", "Value.sell.median", "Value.sell.volume", "Value.sell.orderCount", "Value.sell.percentile"})
in
#"Expanded Value.sell"