Reputation: 883
I have created mutable state map using an atom. I would like to get the value of the key from the map. I have tried it in the below way, But it returns "nil" value
(def coll1 (atom {}) )
(swap! coll1 assoc :a "XXXX" :b "XXXXXX")
This statement printing
(println coll1)
#object[clojure.lang.Atom 0x771a660 {:status :ready, :val {:a XXXX, :b XXXXXX}}]
I have written this statement to fetch value of :a
(println (get-in coll1 [:val :a]))
Upvotes: 1
Views: 390