Fork me on GitHub
#specter
<
2019-01-07
>
nathanmarz14:01:13

@mfm you can do that like this:

(def CONTENT-WALKER
  (recursive-path [] p
    [ALL
     (if-path map?
       [:content p]
       STAY
       )]))

(into {}
  (select
    [ALL
     (collect-one :tag)
     :content
     (subselect CONTENT-WALKER)
     (if-path #(= 1 (count %)) FIRST STAY)
     ]
    data)
    )

zlrth14:01:41

thank you!