Extract values from vector of maps conditionally in clojure

Viewed 2587

This code extracts all values from vector of maps.

(def vector-of-maps [{:a "1" :b "2"}{:a "3" :b "4"}])
(mapcat vals vector-of-maps)

so I get ("1" "2" "3" "4")

I want to get values only from :a to get ("1" "3")

What way can I do it ?

2 Answers
Related