Open wshager opened 11 years ago
I realize this is an old question, but I had the same one and thought I'd post what I was able to figure out.
Basically it seems to flatten out child arrays found in a target property e.g. using this array
[
{
name: "Jimbo",
snacks: ["pizza", "burger"],
hats: ["toque", "beanie"]
},
{
name: "Danbo",
snacks: ["pie", "carrot", "apple"],
hats: ["sombrero"]
}
]
and this query string
recurse(snacks)
will give this result array
[
{
name: "Jimbo",
snacks: ["pizza", "burger"],
hats: ["toque", "beanie"]
},
"pizza",
"burger",
{
name: "Danbo",
snacks: ["pie", "carrot", "apple"],
hats: ["sombrero"]
},
"pie",
"carrot",
"apple"
]
To me it is unclear what recurse does.