Created
August 13, 2014 20:50
-
-
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
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(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