clojure: how to get values from lazy seq? -


iam new clojure , need value out of lazy sequence.

you can have @ full data structure here: http://pastebin.com/ynljalap need content of title:

{: _content albumtitel2} 

i managed list of _content values:

(def albumtitle (map #(str (get % :title)) photosets)) (println albumtitle) 

and result is:

({:_content albumtitel2} {:_content test} {:_content albumtitel} {:_content album123}   {:_content speciale} {:_content neues b5 album} {:_content album nr 2}) 

but how can value of every :_content?

any appreciated!

thanks!

you this

(map (comp :_content :title) photosets) 

keywords work functions, composition comp first retrieve :title value of each photoset , further retrieve :_content value of value.

alternatively written as

(map #(get-in % [:title :_content]) photosets) 

Comments

Popular posts from this blog

image - ClassNotFoundException when add a prebuilt apk into system.img in android -

I need to import mysql 5.1 to 5.5? -

Java, Hibernate, MySQL - store UTC date-time -