Does somebody please help me understand how a new object can be created from data responded from a table. I need to build a filter by a field that is already grouped by another one. For example, the data is already grouped by the "category" field and now for each category I need to show the "types" of document files it has. I will also need to build a function to call on click by this field or index?
I got the following structure but do not how it is working, currently it is filtering by a different field:
What I have tried:
<li ng repeat type in typeObj[category.category].subcategories ng-click="show(subcategory, category)>
typeObj:
categories:{[category:{"a"}, category:{"b"}, category:{"c"}}...
$scope.show(subcategory, category){
$scope.listOfDocuments=$scope.typeObj(subcategory, id);}