Hi guys! I have this kind of data:
(def index
{"foo/article/*" {:exclude #{:a} :include #{:b}}
"foo*" {:exclude #{:c}}
"baz" {:exclude #{:d} :include #{:a}}})
I want to match all exclude and include keys for all the key who end with a *. This works:
(def ks (s/select [s/MAP-KEYS (s/pred #(str/ends-with? % "*"))] index))
(def path (apply s/multi-path (mapv #(vector (s/keypath %)) ks)))
(s/select path url-index)
but is there an other way to achieve this query?[s/ALL (fn [[k v]] (str/ends-with? k "*")) s/LAST]. Untested
Yes it works! Thanks!