Forum Discussion

vivekk0312's avatar
vivekk0312
New Member
6 years ago
Solved

Read an item in the List object in a table column

Hi,   I have list object with value as in one of the column in a table. I would like to fetch the item in the list where key is "isproduction" and i want to read the value of the "value" property i...
  • dax's avatar
    6 years ago

    Hi vivekk0312 , 

    You could expand the list and filter it like below

    let
        Source = Json.Document(File.Contents("C:\Users\<username>\Desktop\gantt.json")),
        #"Converted to Table" = Record.ToTable(Source),
        #"Expanded Value" = Table.ExpandListColumn(#"Converted to Table", "Value"),
        #"Expanded Value1" = Table.ExpandRecordColumn(#"Expanded Value", "Value", {"key", "value"}, {"key", "value.1"}),
        #"Filtered Rows" = Table.SelectRows(#"Expanded Value1", each ([key] = "isproduction"))
    in
        #"Filtered Rows"

     

    Best Regards,
    Zoe Zhi

    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.