title: Clojure - extract values from a vector of hashmaps
body: <p>Wracking my brain this afternoon trying to figure this one out. I'm fairly new to Clojure and Lisp in general. I have a data structure that is a vector of maps and I want to get all the values for a particular key out of all of the maps into another vector.</p>
  
  <p>For example, let's say this is the vector of maps bound to myvec:</p>
  
  <pre><code>[ { "key1" "value1" "key2" "value2"} {"key1" "value3" "key2" "value4"} ]
  </code></pre>
  
  <p>and I want a vector that looks like</p>
  
  <pre><code>[ "value1" "value3" ]
  </code></pre>
  
  <p>made up of all the values of the key "key1"</p>
  
  <p>The only way I could think of to do it is</p>
  
  <pre><code>(for [i (range (count(myvec)))] ((myvec i) "key1"))
  </code></pre>
  
  <p>Is there an easier way? It seems like there must be.</p>
  
  <p>Thanks.</p>