i have following code i have more then one object in return how to get these please help check below code and image file
.then(response => {
this.jobCategories = response.data;
console.log(response.data);
this.jobCategories.categories.sort(function(a,b){
a.child_categories.sort();
return a.category_name > b.category_name;
});
this.selectedCategoryL1 = this.jobCategories.categories[0];
this.selectedCategoryL2 = this.selectedCategoryL1.child_categories[0];
});
//MY DROP DOWN
<select class="form-control ng-pristine ng-valid ng-not-empty ng-touched" name="category" id="category" ng-model="postjobcustomerCtrl.selectedCategoryL1" ng-options="category.category_name for category in postjobcustomerCtrl.jobCategories.categories | orderBy:'category_name' track by category.category_name" ng-change="postjobcustomerCtrl.changeChildCategory()" aria-invalid="false" style=""></select>
Sub Category
<select class="form-control" name="subcategory" id="subcategory" ng-model="postjobcustomerCtrl.selectedCategoryL2" ng-options="option for option in postjobcustomerCtrl.selectedCategoryL1.child_categories | orderBy"></select>