How to get json array from json array


#1

I have json array to show category and subcategories and sub-subcategories

and i want show ALL of sub Subcategories with ng repeat

[ { "id": "9", "name": "Mobile", "subCategories": [ { "subCategoryId": "10", "subCategoryName": "Apple", "subSubCategories": [ { "subSubCategoryId": "28", "subSubCategoryName": "iPhone 6" }, { "subSubCategoryId": "29", "subSubCategoryName": "iPhone 6s" }, ] }, { "subCategoryId": "11", "subCategoryName": "Samsung", "subSubCategories": [] }, ] } ]

My Controller

.controller('CatsCtrl', function($scope, $http) { $http.get('api/categories').then(function(resp) { console.log('Success', resp); $scope.cats = resp.data; }, function(err) { console.error('ERR', err); $scope.cats = err; }) })

HTML View

<ion-content class="padding"> <div ng-repeat="item in cats"> {{item.subCategories[0].subCategoryName}} </div> </ion-content>