zed icon indicating copy to clipboard operation
zed copied to clipboard

furl/unfurl

Open mccanne opened this issue 2 years ago • 1 comments

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 avatar Nov 29 '23 21:11 mccanne

This is like jq to_entries and from_entries

mccanne avatar Nov 29 '23 21:11 mccanne