0
votes

How to convert in Clojure a sequence with maps structure (:data), like this:

{:data ({2019-09-20 3.673202} {2018-01-01 4.673202} {2018-01-02 5.673202}) }

into a map of key-value pairs, like this one:

{:data {2019-09-20 3.673202, 2018-01-01 4.673202, 2018-01-02 5.673202}}
2

2 Answers

3
votes

Another option is into:

(let [data [ map1 map2 map3 ...]
  (into {} data))
2
votes
(let [data '({"2019-09-20" 3.673202} {"2018-01-01" 4.673202} {"2018-01-02" 5.673202})]
    (apply merge data))
=> {"2019-09-20" 3.673202, "2018-01-01" 4.673202, "2018-01-02" 5.673202}