(defn redact
[data]
(walk/postwalk
(fn [node]
(if (and (vector? node) (= :id-number (first node)))
[:id-number "REDACTED"]
node))
data))
About: Curious programmer sharing byte-sized knowledge on dev.to. Passionate about Git, GCP, TypeScript, Next.js, and DevTools. Enjoys collaborating with others and leading by example.
(defn redact
[data]
(walk/postwalk
(fn [node]
(if (and (vector? node) (= :id-number (first node)))
[:id-number "REDACTED"]
node))
data))