Skip to content

Instantly share code, notes, and snippets.

@maca
Created December 12, 2014 17:13
Show Gist options
  • Save maca/e7002eb10f36fcdbc51b to your computer and use it in GitHub Desktop.
Save maca/e7002eb10f36fcdbc51b to your computer and use it in GitHub Desktop.
expected.json
[
{
"name":"Ciencia",
"parent_id":null,
"id":7,
"children":[
{
"name":"Psicología",
"parent_id":7,
"id":12,
"children":[
]
},
{
"name":"Geología",
"parent_id":7,
"id":11,
"children":[
]
},
{
"name":"Física",
"parent_id":7,
"id":10,
"children":[
]
},
{
"name":"Química",
"parent_id":7,
"id":9,
"children":[
]
},
{
"name":"Biología",
"parent_id":7,
"id":8,
"children":[
{
"name":"Botánica",
"parent_id":8,
"id":19,
"children":[
]
},
{
"name":"Etología",
"parent_id":8,
"id":18,
"children":[
{
"name":"Animalitos",
"parent_id":18,
"id":20,
"children":[
]
}
]
}
]
}
]
}
]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment