On Wed, Apr 20, 2011 at 4:24 AM, Dave <kincaid.d...@gmail.com> wrote:
> The only way I could think of to do it is
>
> (for [i (range (count(myvec)))] ((nth myvec i) "key1"))
>
> Is there an easier way? It seems like there must be.

There is! (in fact there could be many ways)

(vec (map #(% "key1") myvec))
;=> ["value1" "value3"]

I hope I understood the problem correctly.

Regards,
BG

-- 
Baishampayan Ghose
b.ghose at gmail.com

-- 
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to clojure@googlegroups.com
Note that posts from new members are moderated - please be patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en

Reply via email to