Hi, I am trying to parse a structure with arbitrary depth and branches, sample data -
{:role0 {:clients {:a 1
:b 2}
:children {:role1 {:clients {:c 3}
:children {:role3 {:clients {:d 4}}}}
:role2 {:clients {:e 5
:f 6}}}}}
to extract all the clients ->
[{:a 1} {:b 2} {:c 3} {:d 4} {:e 5} {:f 6}
Can I do it with meander ?This isn't quite there but with a few tweaks should get you the output you want:
(->> (m/search data
(m/$ {:clients (m/some ?clients)})
?clients)
(into {}))thanks @pranav.ram7