Assuming that we have a vector of hashmaps containing addresses, how to use specter to group them by :country
, then by :city
?
(I could do it without specter, but I am curious)
I noticed the s/view
that could be used instead of s/transformed
(specter/select [(specter/transformed [] (partial group-by :country))
(specter/transformed [specter/MAP-VALS] (partial group-by :city))]
addresses)
(i'm kind of new, so maybe there is a smarter way)