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

plot - Remove Objects from Legend When You Have Also Used Fit, Matlab -

java - Why does my date parsing return a weird date? -

Need help in packaging app using TideSDK on Windows -