Skip to content

Instantly share code, notes, and snippets.

View jonsoini's full-sized avatar
💭
Wrangling bits

Jon Soini jonsoini

💭
Wrangling bits
View GitHub Profile
@Hugoberry
Hugoberry / JSON2table.m
Last active May 20, 2024 18:38
JSON to Table in Power Query M
(json) =>
let
//List the expandable columns
expandableColumns = (_) => List.Accumulate(
Table.ColumnNames(_),
{},
(s,c)=>s&(if Type.Is(Value.Type(Record.Field(_{0},c)), type record)
or Type.Is(Value.Type(Record.Field(_{0},c)), type list)
then {c}
else {})