Hi I have a deeply nested datastructure (maps and vectors) where i need to find the paths to a value. What's the best way to achieve this?
(def data {:a [{:b 1 :c 2}, {:b 3 :c 4 :d 1}]}
(??? data 1) => [[:a 0 :b] [:a 1 :d]]
reduce-kv or smth like that
Thanks will have a look 👍
the nice thing about it, is it works for vectors too, the "key" being the index of an element
This does something similar, fwiw: https://github.com/escherize/tracks/blob/master/src/tracks/core.cljc#L4
Thanks for the example