This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2021-12-22
Channels
- # adventofcode (21)
- # announcements (2)
- # babashka (35)
- # beginners (45)
- # calva (22)
- # cider (28)
- # clj-kondo (39)
- # clj-on-windows (69)
- # clojure (28)
- # clojure-europe (15)
- # clojure-nl (7)
- # clojure-uk (24)
- # clojurescript (95)
- # cursive (9)
- # data-science (3)
- # datalevin (2)
- # emacs (11)
- # etaoin (9)
- # fulcro (1)
- # graphql (4)
- # jobs (8)
- # lsp (66)
- # malli (10)
- # missionary (3)
- # pathom (4)
- # polylith (67)
- # releases (3)
- # reveal (2)
- # shadow-cljs (53)
- # spacemacs (2)
- # specter (1)
- # sql (1)
- # tools-deps (6)
- # vim (4)
- # xtdb (16)
Hi, I’m starting with specter and I have a question, I have this map {:a {:f-c "a" :p 3.3 :l 1} :b {:f-c "b" :p 6.7 :l 2}}
that I want to transform it in [{:c "a" :pct 3.3} {:c "b" :pct 6.7}]
(def ui {:alloc {:a {:f-c "a" :p 3.3 :l 1} :b {:f-c "b" :p 6.7 :l 2}}})
(s/transform :alloc #(into [] %) ui) => {:alloc [[:a {:f-c "a", :p 3.3, :l 1}] [:b {:f-c "b", :p 6.7, :l 2}]]}
I haven’t been able to get the values of the internal maps in order to use their values and create a new structure
what am I missing here?