In Clojure, how can I find the value of a key that may be deep in a nested map structure? For example:
(def m {:a {:b \"b\"
:c \"c\"
:d {
If you know the nested path then use get-in.
=> (get-in m [:a :d :f])
=> "f"
See here for details: https://clojuredocs.org/clojure.core/get-in
If you don't know the path in your nested structure you could write a function that recurses through the nested map looking for the particular key in question and either returns its value when it finds the first one or returns all the values for :f in a seq.