This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2023-02-15
Channels
- # announcements (5)
- # babashka (56)
- # beginners (24)
- # biff (15)
- # calva (7)
- # clj-kondo (12)
- # cljsrn (8)
- # clojure (68)
- # clojure-denmark (1)
- # clojure-europe (55)
- # clojure-norway (4)
- # clojure-spec (9)
- # clojure-uk (2)
- # clojurescript (8)
- # cursive (11)
- # data-science (7)
- # datahike (1)
- # datomic (66)
- # emacs (12)
- # etaoin (3)
- # fulcro (10)
- # graphql (3)
- # hyperfiddle (97)
- # jobs (1)
- # kaocha (8)
- # lsp (3)
- # malli (15)
- # meander (1)
- # off-topic (3)
- # overtone (4)
- # polylith (7)
- # rdf (25)
- # re-frame (4)
- # reagent (14)
- # remote-jobs (1)
- # shadow-cljs (126)
- # sql (30)
- # vscode (3)
- # xtdb (8)
Hi, I just started learning about meander and I have a couple of questions:
Using the data bellow,
1. Would it be possible to join the items in a vector of maps which have the same keys?
for example for :authors
. (Assuming there will only be two items in the vector :editions
).
1. Assign values to keys based on conditions from other keys, for example the key :first-edition-year
would have the value of :publication-year
if the value of key :first-edition
is true.
I have:
{:editions [{:book {:id 1
:title "title1"
:authors ["author1" "author2"]
:pages 123
:isbn "2353-2343"
:publication-year 1995
:first-edition true}}
{:book {:id 2
:title "title1"
:authors ["author3"]
:pages 123
:isbn "6745-4623"
:publication-year 2001}}]}
Transform into:
{:title "title1"
:authors ["author1" "author2" "author3"]
:pages 123
:first-edition-year 1995
:publication-year 2001}