Skip to content

Instantly share code, notes, and snippets.

@BorisKourt
Created August 13, 2014 20:50
Show Gist options
  • Save BorisKourt/f52826c40ee766d72954 to your computer and use it in GitHub Desktop.
Save BorisKourt/f52826c40ee766d72954 to your computer and use it in GitHub Desktop.
How to traverse this to get a val for :name in the same map as an :id of n
(def nested-data
(atom
{:name "Top"
:id 1314
:subs [{:name "Terms"
:id 2431
:subs [{:name "Causes"
:id 3322
:subs []}
{:name "Tempo"
:id 4134
:subs [{:name "Inner Tempo"
:id 5143
:subs []}]}]}
{:name "Con"
:id 3436
:subs []}
{:name "Words"
:id 7443
:subs [{:name "Sub"
:id 8123
:subs [{:name "Volume"
:id 1899
:subs []}]}]}]}))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment