Forum Discussion
Stuck with "nested" records
- 10 years ago
The appove code gives me the record which contains a record. Do you have any suggestiosn how i can access the nested record directly from the above query?
Please try the formula below.
let getOWHeroesStats = (charString as text) =>
let Source = Json.Document(Web.Contents("https://api.lootbox.eu/pc/eu/donatellow-2669/competitive-play/hero/"& charString & "/")),
Hero = Record.FieldOrDefault(Source, charString),
#"Converted to Table" = Record.ToTable(Hero),
#"Transposed Table" = Table.Transpose(#"Converted to Table"),
#"Promoted Headers" = Table.PromoteHeaders(#"Transposed Table")
in #"Promoted Headers"
in getOWHeroesStatsFollowing is the result for hero "Tracer".
Regards
Hi.
Nope, didn't do the trick either :/
Isn't there someway in my functions that i can get the nested record directly to the column?
let getOWHeroesStats = (charString as text) =>
let Source = Json.Document(Web.Contents("https://api.lootbox.eu/pc/eu/donatellow-2669/competitive-play/hero/"& charString & "/"))
in Source
in getOWHeroesStatsThe appove code gives me the record which contains a record. Do you have any suggestiosn how i can access the nested record directly from the above query?
Best,
Simon
The appove code gives me the record which contains a record. Do you have any suggestiosn how i can access the nested record directly from the above query?
Please try the formula below.
let getOWHeroesStats = (charString as text) =>
let Source = Json.Document(Web.Contents("https://api.lootbox.eu/pc/eu/donatellow-2669/competitive-play/hero/"& charString & "/")),
Hero = Record.FieldOrDefault(Source, charString),
#"Converted to Table" = Record.ToTable(Hero),
#"Transposed Table" = Table.Transpose(#"Converted to Table"),
#"Promoted Headers" = Table.PromoteHeaders(#"Transposed Table")
in #"Promoted Headers"
in getOWHeroesStats
Following is the result for hero "Tracer".
Regards
- SimonKragh10 years agoFrequent Visitor
v-ljerr-msft Yes yes yes! Works like a charm! Thank you so much!