This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| let | |
| Value.FixType = (value, optional depth) => | |
| let | |
| nextDepth = if depth = null then 3 else depth - 1, | |
| result = if depth = 0 then null | |
| else if value is type then TextType(value) | |
| else if value is table then Table.TransformColumns(value, {}, @Value.FixType) | |
| else if value is list then List.Transform(value, each @Value.FixType(_, nextDepth)) | |
| else if value is record then | |
| Record.FromList(List.Transform(Record.ToList(value), each @Value.FixType(_, nextDepth)), Record.FieldNames(value)) |