brimdata / zed

A novel data lake based on super-structured data
https://zed.brimdata.io/
BSD 3-Clause "New" or "Revised" License
1.37k stars 67 forks source link

furl/unfurl #4910

Open mccanne opened 9 months ago

mccanne commented 9 months ago

furl/unfurl shall be introduced as functions in Zed and return an array of records comprising a single path element (as in flatten) called key and the corresponding value derived from the input value. e.g.,

unfurl({a:[1,2],b:"foo"})

returns

[
   {
    key: "a",
    value: [1,2]
  },
  {
    key: "b",
    value: "foo"
  }
]

unfurl returns the inverse of furl.

mccanne commented 9 months ago

This is like jq to_entries and from_entries