I want to populate an array ( $scope.children= [];) with all the children extracted from this array format (JSON data from a GET). Note that there is no top-level label.
[
{
"tenant_id": 38,
"name": "Larry",
"children": [
"mike"
]
},
{
"tenant_id": 89,
"name": "Moe",
"children": [
"paul"
]
},
{
"tenant_id": 95,
"name": "Laurel",
"children": null
},
{
"tenant_id": 108,
"name": "Mark",
"children": [
"louise"
]
{
"tenant_id": 39,
"name": "Hardy",
"children": [
"trevor",
"alison"
]
}
]