Here is an example of an object:
$scope.categories = [ { value: 'One', id: 1, childs: [ { value: 'Two', id : 2, childs: [ { value: 'Three', id: 3 }, { value: 'Four', id: 4 } ] }, { value: 'Five', id: 5 }, { value: 'Six', id: 6, childs: [ { value: 'Seven', id: 7 }, { value: 'Eight', id: 8 } ] } ] }, { value: 'Nine', id: 9 } ];
If I know the id, how can I get the element and its parents?
I am using AngularJS but it doesn't seem to be helping me with this task...