Fork me on GitHub
#specter
<
2016-03-18
>
hugobessaa12:03:32

@alexisgallagher: I tried to do this myself last week. I ended up doing this:

hugobessaa12:03:36

(specter/transform [:profile-edit :navigation specter/ALL :anchors]
                     (partial filter anchor-on-page?)
                     db)

hugobessaa12:03:25

anchor-on-page? is my predicate that test some nested data

hugobessaa12:03:02

revisiting the docs, I think I found what you and I were looking for:

hugobessaa12:03:07

(transform [ALL (if-path [:a even?] [:c ALL] :d)]
              inc
              [{:a 2 :c [1 2] :d 4} {:a 4 :c [0 10 -1]} {:a -1 :c [1 1 1] :d 1}])

wei23:03:04

I would stick with filter/`get-in` in this case.