instar icon indicating copy to clipboard operation
instar copied to clipboard

Recursive get-values-in-paths?

Open mstang opened this issue 10 years ago • 3 comments

Is it possible to search through a tree for a keyword and return the found value?

It seems that:

(get-values-in-paths tree [* :path]) only searches one level down.

mstang avatar Nov 08 '15 21:11 mstang

Yea, I've been bitten by this too. It's because * only matches one thing, and not zero or more things. I've been thinking that maybe we need another operator like ** for that... or that you can specify a predicate instead of a literal path and then you can do whatever you want in there?

boxed avatar Nov 11 '15 19:11 boxed

maybe something that mimicates glob? in glob "?" = 1 character

vendethiel avatar Nov 11 '15 20:11 vendethiel

We already have a way to match on parts of keys with regex so I don't see how '?' makes sense.

boxed avatar Nov 17 '15 18:11 boxed