zed
zed copied to clipboard
furl/unfurl
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.
This is like jq to_entries and from_entries