Search Posts

Category: sorting

Filtering is not working on Array of objects in AngularJS

I have list of products as array of object. Want to display that based on highest views count. I tried to use “orderBy” service. But it’s not filtering from my attached array of object. Any suggestion about how to do that? vm.products = [ { title : ‘ABC’, imgSrc: ‘../../images/product1.png’, viewsCount: ‘183’, clicksCount: ’34’ }, { title : ‘DEF’, imgSrc: ‘../../images/product1.png’, viewsCount: ‘158’, clicksCount: ’30’ }, { title : ‘GHI’, imgSrc: ‘../../images/product1.png’, viewsCount: ’86’, clicksCount: […]

Getting unexpected error while sorting the drop down value using Angular.js

I am getting some error while sorting my drop down value alphabetically using Angular.js. I am explaining my code below. <div ng-dropdown-multiselect=”” options=”example16data | orderBy:’label'” selected-model=”example16model” checkboxes=”true” extra-settings=”example16settings” class=”form-control”></div> angular.forEach(response.data,function(obj){ var data={‘label’:obj.cat_name+’:’+obj.subcat_name,’id’:obj.subcat_id}; $scope.example16data.push(data); }) Here I am using Anguar’s angularjs-dropdown-multiselect for drop down list but when I am trying to sorting the list I am getting the following unexpected error. Uncaught Error: [$rootScope:infdig] http://errors.angularjs.org/1.4.6/$rootScope/infdig?p0=10&p1=%5B%5B%7B%22msg%22%3A%22fn%3A%20function%20(c%2Cd%2Ce%2Cf)%7Be%3Da(c%2C%5Cr%5Cnd%2Ce%2Cf)%3Breturn%20b(e%2Cc%2Cd)%7D%22%2C%22newVal%22%3A%5B%7B%22label%22%3A%22DRINKS%3ABEER%22%2C%22id%22%3A%2250%22%2C%22%24%24hashKey%22%3A%22object%3A341%22%7D%2C%7B%22label%22%3A%22DRINKS%3ACOCKTAILS%22%2C%22id%22%3A%2257%22%2C%22%24%24hashKey%22%3A%22object%3A342%22%7D%2C%7B%22label%22%3A%22DRINKS%3AWINE%22%2C%22id%22%3A%2251%22%2C%22%24%24hashKey%22%3A%22object%3A343%22%7D%2C%7B%22label%22%3A%22FOOD%3AAPPETIZERS%22%2C%22id%22%3A%2220%22%2C%22%24%24hashKey%22%3A%22object%3A344%22%7D%2C%7B%22label%22%3A%22FOOD%3ABREAKFAST%22%2C%22id%22%3A%2228%22%2C%22%24%24hashKey%22%3A%22object%3A345%22%7D%2C%7B%22label%22%3A%22FOOD%3ABRUNCH%22%2C%22id%22%3A%2226%22%2C%22%24%24hashKey%22%3A%22object%3A346%22%7D%2C%7B%22label%22%3A%22FOOD%3ACHINESE%22%2C%22id%22%3A%226%22%2C%22%24%24hashKey%22%3A%22object%3A347%22%7D%2C%7B%22label%22%3A%22FOOD%3AGREEK%22%2C%22id%22%3A%2218%22%2C%22%24%24hashKey%22%3A%22object%3A348%22%7D%2C%7B%22label%22%3A%22FOOD%3AINDIAN%22%2C%22id%22%3A%2224%22%2C%22%24%24hashKey%22%3A%22object%3A349%22%7D%2C%7B%22label%22%3A%22FOOD%3AITALIAN%22%2C%22id%22%3A%227%22%2C%22%24%24hashKey%22%3A%22object%3A350%22%7D%2C%7B%22label%22%3A%22FOOD%3ALATE%20NIGHT%22%2C%22id%22%3A%2247%22%2C%22%24%24hashKey%22%3A%22object%3A351%22%7D%2C%7B%22label%22%3A%22FOOD%3ALUNCH%22%2C%22id%22%3A%2227%22%2C%22%24%24hashKey%22%3A%22object%3A352%22%7D%2C%7B%22label%22%3A%22FOOD%3APIZZA%22%2C%22id%22%3A%225%22%2C%22%24%24hashKey%22%3A%22object%3A353%22%7D%2C%7B%22label%22%3A%22FOOD%3ASEAFOOD%22%2C%22id%22%3A%2244%22%2C%22%24%24hashKey%22%3A%22object%3A354%22%7D%2C%7B%22label%22%3A%22FOOD%3ASUSHI%22%2C%22id%22%3A%229%22%2C%22%24%24hashKey%22%3A%22object%3A355%22%7D%2C%7B%22label%22%3A%22FOOD%3ATHAI%22%2C%22id%22%3A%2211%22%2C%22%24%24hashKey%22%3A%22object%3A356%22%7D%2C%7B%22label%22%3A%22FOOD%3AVIETNAMESE%22%2C%22id%22%3A%228%22%2C%22%24%24hashKey%22%3A%22object%3A357%22%7D%2C%7B%22label%22%3A%22FOOD%3AWINGS%22%2C%22id%22%3A%2219%22%2C%22%24%24hashKey%22%3A%22object%3A358%22%7D%2C%7B%22label%22%3A%22HAPPY%20HOUR%3AHAPPY%20HOUR%22%2C%22id%22%3A%2242%22%2C%22%24%24hashKey%22%3A%22object%3A359%22%7D%5D%2C%22oldVal%22%3A%5B%7B%22label%22%3A%22DRINKS%3ABEER%22%2C%22id%22%3A%2250%22%2C%22%24%24hashKey%22%3A%22object%3A341%22%7D%2C%7B%22label%22%3A%22DRINKS%3ACOCKTAILS%22%2C%22id%22%3A%2257%22%2C%22%24%24hashKey%22%3A%22object%3A342%22%7D%2C%7B%22label%22%3A%22DRINKS%3AWINE%22%2C%22id%22%3A%2251%22%2C%22%24%24hashKey%22%3A%22object%3A343%22%7D%2C%7B%22label%22%3A%22FOOD%3AAPPETIZERS%22%2C%22id%22%3A%2220%22%2C%22%24%24hashKey%22%3A%22object%3A344%22%7D%2C%7B%22label%22%3A%22FOOD%3ABREAKFAST%22%2C%22id%22%3A%2228%22%2C%22%24%24hashKey%22%3A%22object%3A345%22%7D%2C%7B%22label%22%3A%22FOOD%3ABRUNCH%22%2C%22id%22%3A%2226%22%2C%22%24%24hashKey%22%3A%22object%3A346%22%7D%2C%7B%22label%22%3A%22FOOD%3ACHINESE%22%2C%22id%22%3A%226%22%2C%22%24%24hashKey%22%3A%22object%3A347%22%7D%2C%7B%22label%22%3A%22FOOD%3AGREEK%22%2C%22id%22%3A%2218%22%2C%22%24%24hashKey%22%3A%22object%3A348%22%7D%2C%7B%22label%22%3A%22FOOD%3AINDIAN%22%2C%22id%22%3A%2224%22%2C%22%24%24hashKey%22%3A%22object%3A349%22%7D%2C%7B%22label%22%3A%22FOOD%3AITALIAN%22%2C%22id%22%3A%227%22%2C%22%24%24hashKey%22%3A%22object%3A350%22%7D%2C%7B%22label%22%3A%22FOOD%3ALATE%20NIGHT%22%2C%22id%22%3A%2247%22%2C%22%24%24hashKey%22%3A%22object%3A351%22%7D%2C%7B%22label%22%3A%22FOOD%3ALUNCH%22%2C%22id%22%3A%2227%22%2C%22%24%24hashKey%22%3A%22object%3A352%22%7D%2C%7B%22label%22%3A%22FOOD%3APIZZA%22%2C%22id%22%3A%225%22%2C%22%24%24hashKey%22%3A%22object%3A353%22%7D%2C%7B%22label%22%3A%22FOOD%3ASEAFOOD%22%2C%22id%22%3A%2244%22%2C%22%24%24hashKey%22%3A%22object%3A354%22%7D%2C%7B%22label%22%3A%22FOOD%3ASUSHI%22%2C%22id%22%3A%229%22%2C%22%24%24hashKey%22%3A%22object%3A355%22%7D%2C%7B%22label%22%3A%22FOOD%3ATHAI%22%2C%22id%22%3A%2211%22%2C%22%24%24hashKey%22%3A%22object%3A356%22%7D%2C%7B%22label%22%3A%22FOOD%3AVIETNAMESE%22%2C%22id%22%3A%228%22%2C%22%24%24hashKey%22%3A%22object%3A357%22%7D%2C%7B%22label%22%3A%22FOOD%3AWINGS%22%2C%22id%22%3A%2219%22%2C%22%24%24hashKey%22%3A%22object%3A358%22%7D%2C%7B%22label%22%3A%22HAPPY%20HOUR%3AHAPPY%20HOUR%22%2C%22id%22%3A%2242%22%2C%22%24%24hashKey%22%3A%22object%3A359%22%7D%5D%7D%5D%2C%5B%7B%22msg%22%3A%22fn%3A%20function%20(c%2Cd%2Ce%2Cf)%7Be%3Da(c%2C%5Cr%5Cnd%2Ce%2Cf)%3Breturn%20b(e%2Cc%2Cd)%7D%22%2C%22newVal%22%3A%5B%7B%22label%22%3A%22DRINKS%3ABEER%22%2C%22id%22%3A%2250%22%2C%22%24%24hashKey%22%3A%22object%3A341%22%7D%2C%7B%22label%22%3A%22DRINKS%3ACOCKTAILS%22%2C%22id%22%3A%2257%22%2C%22%24%24hashKey%22%3A%22object%3A342%22%7D%2C%7B%22label%22%3A%22DRINKS%3AWINE%22%2C%22id%22%3A%2251%22%2C%22%24%24hashKey%22%3A%22object%3A343%22%7D%2C%7B%22label%22%3A%22FOOD%3AAPPETIZERS%22%2C%22id%22%3A%2220%22%2C%22%24%24hashKey%22%3A%22object%3A344%22%7D%2C%7B%22label%22%3A%22FOOD%3ABREAKFAST%22%2C%22id%22%3A%2228%22%2C%22%24%24hashKey%22%3A%22object%3A345%22%7D%2C%7B%22label%22%3A%22FOOD%3ABRUNCH%22%2C%22id%22%3A%2226%22%2C%22%24%24hashKey%22%3A%22object%3A346%22%7D%2C%7B%22label%22%3A%22FOOD%3ACHINESE%22%2C%22id%22%3A%226%22%2C%22%24%24hashKey%22%3A%22object%3A347%22%7D%2C%7B%22label%22%3A%22FOOD%3AGREEK%22%2C%22id%22%3A%2218%22%2C%22%24%24hashKey%22%3A%22object%3A348%22%7D%2C%7B%22label%22%3A%22FOOD%3AINDIAN%22%2C%22id%22%3A%2224%22%2C%22%24%24hashKey%22%3A%22object%3A349%22%7D%2C%7B%22label%22%3A%22FOOD%3AITALIAN%22%2C%22id%22%3A%227%22%2C%22%24%24hashKey%22%3A%22object%3A350%22%7D%2C%7B%22label%22%3A%22FOOD%3ALATE%20NIGHT%22%2C%22id%22%3A%2247%22%2C%22%24%24hashKey%22%3A%22object%3A351%22%7D%2C%7B%22label%22%3A%22FOOD%3ALUNCH%22%2C%22id%22%3A%2227%22%2C%22%24%24hashKey%22%3A%22object%3A352%22%7D%2C%7B%22label%22%3A%22FOOD%3APIZZA%22%2C%22id%22%3A%225%22%2C%22%24%24hashKey%22%3A%22object%3A353%22%7D%2C%7B%22label%22%3A%22FOOD%3ASEAFOOD%22%2C%22id%22%3A%2244%22%2C%22%24%24hashKey%22%3A%22object%3A354%22%7D%2C%7B%22label%22%3A%22FOOD%3ASUSHI%22%2C%22id%22%3A%229%22%2C%22%24%24hashKey%22%3A%22object%3A355%22%7D%2C%7B%22label%22%3A%22FOOD%3ATHAI%22%2C%22id%22%3A%2211%22%2C%22%24%24hashKey%22%3A%22object%3A356%22%7D%2C%7B%22label%22%3A%22FOOD%3AVIETNAMESE%22%2C%22id%22%3A%228%22%2C%22%24%24hashKey%22%3A%22object%3A357%22%7D%2C%7B%22label%22%3A%22FOOD%3AWINGS%22%2C%22id%22%3A%2219%22%2C%22%24%24hashKey%22%3A%22object%3A358%22%7D%2C%7B%22label%22%3A%22HAPPY%20HOUR%3AHAPPY%20HOUR%22%2C%22id%22%3A%2242%22%2C%22%24%24hashKey%22%3A%22object%3A359%22%7D%5D%2C%22oldVal%22%3A%5B%7B%22label%22%3A%22DRINKS%3ABEER%22%2C%22id%22%3A%2250%22%2C%22%24%24hashKey%22%3A%22object%3A341%22%7D%2C%7B%22label%22%3A%22DRINKS%3ACOCKTAILS%22%2C%22id%22%3A%2257%22%2C%22%24%24hashKey%22%3A%22object%3A342%22%7D%2C%7B%22label%22%3A%22DRINKS%3AWINE%22%2C%22id%22%3A%2251%22%2C%22%24%24hashKey%22%3A%22object%3A343%22%7D%2C%7B%22label%22%3A%22FOOD%3AAPPETIZERS%22%2C%22id%22%3A%2220%22%2C%22%24%24hashKey%22%3A%22object%3A344%22%7D%2C%7B%22label%22%3A%22FOOD%3ABREAKFAST%22%2C%22id%22%3A%2228%22%2C%22%24%24hashKey%22%3A%22object%3A345%22%7D%2C%7B%22label%22%3A%22FOOD%3ABRUNCH%22%2C%22id%22%3A%2226%22%2C%22%24%24hashKey%22%3A%22object%3A346%22%7D%2C%7B%22label%22%3A%22FOOD%3ACHINESE%22%2C%22id%22%3A%226%22%2C%22%24%24hashKey%22%3A%22object%3A347%22%7D%2C%7B%22label%22%3A%22FOOD%3AGREEK%22%2C%22id%22%3A%2218%22%2C%22%24%24hashKey%22%3A%22object%3A348%22%7D%2C%7B%22label%22%3A%22FOOD%3AINDIAN%22%2C%22id%22%3A%2224%22%2C%22%24%24hashKey%22%3A%22object%3A349%22%7D%2C%7B%22label%22%3A%22FOOD%3AITALIAN%22%2C%22id%22%3A%227%22%2C%22%24%24hashKey%22%3A%22object%3A350%22%7D%2C%7B%22label%22%3A%22FOOD%3ALATE%20NIGHT%22%2C%22id%22%3A%2247%22%2C%22%24%24hashKey%22%3A%22object%3A351%22%7D%2C%7B%22label%22%3A%22FOOD%3ALUNCH%22%2C%22id%22%3A%2227%22%2C%22%24%24hashKey%22%3A%22object%3A352%22%7D%2C%7B%22label%22%3A%22FOOD%3APIZZA%22%2C%22id%22%3A%225%22%2C%22%24%24hashKey%22%3A%22object%3A353%22%7D%2C%7B%22label%22%3A%22FOOD%3ASEAFOOD%22%2C%22id%22%3A%2244%22%2C%22%24%24hashKey%22%3A%22object%3A354%22%7D%2C%7B%22label%22%3A%22FOOD%3ASUSHI%22%2C%22id%22%3A%229%22%2C%22%24%24hashKey%22%3A%22object%3A355%22%7D%2C%7B%22label%22%3A%22FOOD%3ATHAI%22%2C%22id%22%3A%2211%22%2C%22%24%24hashKey%22%3A%22object%3A356%22%7D%2C%7B%22label%22%3A%22FOOD%3AVIETNAMESE%22%2C%22id%22%3A%228%22%2C%22%24%24hashKey%22%3A%22object%3A357%22%7D%2C%7B%22label%22%3A%22FOOD%3AWINGS%22%2C%22id%22%3A%2219%22%2C%22%24%24hashKey%22%3A%22object%3A358%22%7D%2C%7B%22label%22%3A%22HAPPY%20HOUR%3AHAPPY%20HOUR%22%2C%22id%22%3A%2242%22%2C%22%24%24hashKey%22%3A%22object%3A359%22%7D%5D%7D%5D%2C%5B%7B%22msg%22%3A%22fn%3A%20function%20(c%2Cd%2Ce%2Cf)%7Be%3Da(c%2C%5Cr%5Cnd%2Ce%2Cf)%3Breturn%20b(e%2Cc%2Cd)%7D%22%2C%22newVal%22%3A%5B%7B%22label%22%3A%22DRINKS%3ABEER%22%2C%22id%22%3A%2250%22%2C%22%24%24hashKey%22%3A%22object%3A341%22%7D%2C%7B%22label%22%3A%22DRINKS%3ACOCKTAILS%22%2C%22id%22%3A%2257%22%2C%22%24%24hashKey%22%3A%22object%3A342%22%7D%2C%7B%22label%22%3A%22DRINKS%3AWINE%22%2C%22id%22%3A%2251%22%2C%22%24%24hashKey%22%3A%22object%3A343%22%7D%2C%7B%22label%22%3A%22FOOD%3AAPPETIZERS%22%2C%22id%22%3A%2220%22%2C%22%24%24hashKey%22%3A%22object%3A344%22%7D%2C%7B%22label%22%3A%22FOOD%3ABREAKFAST%22%2C%22id%22%3A%2228%22%2C%22%24%24hashKey%22%3A%22object%3A345%22%7D%2C%7B%22label%22%3A%22FOOD%3ABRUNCH%22%2C%22id%22%3A%2226%22%2C%22%24%24hashKey%22%3A%22object%3A346%22%7D%2C%7B%22label%22%3A%22FOOD%3ACHINESE%22%2C%22id%22%3A%226%22%2C%22%24%24hashKey%22%3A%22object%3A347%22%7D%2C%7B%22label%22%3A%22FOOD%3AGREEK%22%2C%22id%22%3A%2218%22%2C%22%24%24hashKey%22%3A%22object%3A348%22%7D%2C%7B%22label%22%3A%22FOOD%3AINDIAN%22%2C%22id%22%3A%2224%22%2C%22%24%24hashKey%22%3A%22object%3A349%22%7D%2C%7B%22label%22%3A%22FOOD%3AITALIAN%22%2C%22id%22%3A%227%22%2C%22%24%24hashKey%22%3A%22object%3A350%22%7D%2C%7B%22label%22%3A%22FOOD%3ALATE%20NIGHT%22%2C%22id%22%3A%2247%22%2C%22%24%24hashKey%22%3A%22object%3A351%22%7D%2C%7B%22label%22%3A%22FOOD%3ALUNCH%22%2C%22id%22%3A%2227%22%2C%22%24%24hashKey%22%3A%22object%3A352%22%7D%2C%7B%22label%22%3A%22FOOD%3APIZZA%22%2C%22id%22%3A%225%22%2C%22%24%24hashKey%22%3A%22object%3A353%22%7D%2C%7B%22label%22%3A%22FOOD%3ASEAFOOD%22%2C%22id%22%3A%2244%22%2C%22%24%24hashKey%22%3A%22object%3A354%22%7D%2C%7B%22label%22%3A%22FOOD%3ASUSHI%22%2C%22id%22%3A%229%22%2C%22%24%24hashKey%22%3A%22object%3A355%22%7D%2C%7B%22label%22%3A%22FOOD%3ATHAI%22%2C%22id%22%3A%2211%22%2C%22%24%24hashKey%22%3A%22object%3A356%22%7D%2C%7B%22label%22%3A%22FOOD%3AVIETNAMESE%22%2C%22id%22%3A%228%22%2C%22%24%24hashKey%22%3A%22object%3A357%22%7D%2C%7B%22label%22%3A%22FOOD%3AWINGS%22%2C%22id%22%3A%2219%22%2C%22%24%24hashKey%22%3A%22object%3A358%22%7D%2C%7B%22label%22%3A%22HAPPY%20HOUR%3AHAPPY%20HOUR%22%2C%22id%22%3A%2242%22%2C%22%24%24hashKey%22%3A%22object%3A359%22%7D%5D%2C%22oldVal%22%3A%5B%7B%22label%22%3A%22DRINKS%3ABEER%22%2C%22id%22%3A%2250%22%2C%22%24%24hashKey%22%3A%22object%3A341%22%7D%2C%7B%22label%22%3A%22DRINKS%3ACOCKTAILS%22%2C%22id%22%3A%2257%22%2C%22%24%24hashKey%22%3A%22object%3A342%22%7D%2C%7B%22label%22%3A%22DRINKS%3AWINE%22%2C%22id%22%3A%2251%22%2C%22%24%24hashKey%22%3A%22object%3A343%22%7D%2C%7B%22label%22%3A%22FOOD%3AAPPETIZERS%22%2C%22id%22%3A%2220%22%2C%22%24%24hashKey%22%3A%22object%3A344%22%7D%2C%7B%22label%22%3A%22FOOD%3ABREAKFAST%22%2C%22id%22%3A%2228%22%2C%22%24%24hashKey%22%3A%22object%3A345%22%7D%2C%7B%22label%22%3A%22FOOD%3ABRUNCH%22%2C%22id%22%3A%2226%22%2C%22%24%24hashKey%22%3A%22object%3A346%22%7D%2C%7B%22label%22%3A%22FOOD%3ACHINESE%22%2C%22id%22%3A%226%22%2C%22%24%24hashKey%22%3A%22object%3A347%22%7D%2C%7B%22label%22%3A%22FOOD%3AGREEK%22%2C%22id%22%3A%2218%22%2C%22%24%24hashKey%22%3A%22object%3A348%22%7D%2C%7B%22label%22%3A%22FOOD%3AINDIAN%22%2C%22id%22%3A%2224%22%2C%22%24%24hashKey%22%3A%22object%3A349%22%7D%2C%7B%22label%22%3A%22FOOD%3AITALIAN%22%2C%22id%22%3A%227%22%2C%22%24%24hashKey%22%3A%22object%3A350%22%7D%2C%7B%22label%22%3A%22FOOD%3ALATE%20NIGHT%22%2C%22id%22%3A%2247%22%2C%22%24%24hashKey%22%3A%22object%3A351%22%7D%2C%7B%22label%22%3A%22FOOD%3ALUNCH%22%2C%22id%22%3A%2227%22%2C%22%24%24hashKey%22%3A%22object%3A352%22%7D%2C%7B%22label%22%3A%22FOOD%3APIZZA%22%2C%22id%22%3A%225%22%2C%22%24%24hashKey%22%3A%22object%3A353%22%7D%2C%7B%22label%22%3A%22FOOD%3ASEAFOOD%22%2C%22id%22%3A%2244%22%2C%22%24%24hashKey%22%3A%22object%3A354%22%7D%2C%7B%22label%22%3A%22FOOD%3ASUSHI%22%2C%22id%22%3A%229%22%2C%22%24%24hashKey%22%3A%22object%3A355%22%7D%2C%7B%22label%22%3A%22FOOD%3ATHAI%22%2C%22id%22%3A%2211%22%2C%22%24%24hashKey%22%3A%22object%3A356%22%7D%2C%7B%22label%22%3A%22FOOD%3AVIETNAMESE%22%2C%22id%22%3A%228%22%2C%22%24%24hashKey%22%3A%22object%3A357%22%7D%2C%7B%22label%22%3A%22FOOD%3AWINGS%22%2C%22id%22%3A%2219%22%2C%22%24%24hashKey%22%3A%22object%3A358%22%7D%2C%7B%22label%22%3A%22HAPPY%20HOUR%3AHAPPY%20HOUR%22%2C%22id%22%3A%2242%22%2C%22%24%24hashKey%22%3A%22object%3A359%22%7D%5D%7D%5D%2C%5B%7B%22msg%22%3A%22fn%3A%20function%20(c%2Cd%2Ce%2Cf)%7Be%3Da(c%2C%5Cr%5Cnd%2Ce%2Cf)%3Breturn%20b(e%2Cc%2Cd)%7D%22%2C%22newVal%22%3A%5B%7B%22label%22%3A%22DRINKS%3ABEER%22%2C%22id%22%3A%2250%22%2C%22%24%24hashKey%22%3A%22object%3A341%22%7D%2C%7B%22label%22%3A%22DRINKS%3ACOCKTAILS%22%2C%22id%22%3A%2257%22%2C%22%24%24hashKey%22%3A%22object%3A342%22%7D%2C%7B%22label%22%3A%22DRINKS%3AWINE%22%2C%22id%22%3A%2251%22%2C%22%24%24hashKey%22%3A%22object%3A343%22%7D%2C%7B%22label%22%3A%22FOOD%3AAPPETIZERS%22%2C%22id%22%3A%2220%22%2C%22%24%24hashKey%22%3A%22object%3A344%22%7D%2C%7B%22label%22%3A%22FOOD%3ABREAKFAST%22%2C%22id%22%3A%2228%22%2C%22%24%24hashKey%22%3A%22object%3A345%22%7D%2C%7B%22label%22%3A%22FOOD%3ABRUNCH%22%2C%22id%22%3A%2226%22%2C%22%24%24hashKey%22%3A%22object%3A346%22%7D%2C%7B%22label%22%3A%22FOOD%3ACHINESE%22%2C%22id%22%3A%226%22%2C%22%24%24hashKey%22%3A%22object%3A347%22%7D%2C%7B%22label%22%3A%22FOOD%3AGREEK%22%2C%22id%22%3A%2218%22%2C%22%24%24hashKey%22%3A%22object%3A348%22%7D%2C%7B%22label%22%3A%22FOOD%3AINDIAN%22%2C%22id%22%3A%2224%22%2C%22%24%24hashKey%22%3A%22object%3A349%22%7D%2C%7B%22label%22%3A%22FOOD%3AITALIAN%22%2C%22id%22%3A%227%22%2C%22%24%24hashKey%22%3A%22object%3A350%22%7D%2C%7B%22label%22%3A%22FOOD%3ALATE%20NIGHT%22%2C%22id%22%3A%2247%22%2C%22%24%24hashKey%22%3A%22object%3A351%22%7D%2C%7B%22label%22%3A%22FOOD%3ALUNCH%22%2C%22id%22%3A%2227%22%2C%22%24%24hashKey%22%3A%22object%3A352%22%7D%2C%7B%22label%22%3A%22FOOD%3APIZZA%22%2C%22id%22%3A%225%22%2C%22%24%24hashKey%22%3A%22object%3A353%22%7D%2C%7B%22label%22%3A%22FOOD%3ASEAFOOD%22%2C%22id%22%3A%2244%22%2C%22%24%24hashKey%22%3A%22object%3A354%22%7D%2C%7B%22label%22%3A%22FOOD%3ASUSHI%22%2C%22id%22%3A%229%22%2C%22%24%24hashKey%22%3A%22object%3A355%22%7D%2C%7B%22label%22%3A%22FOOD%3ATHAI%22%2C%22id%22%3A%2211%22%2C%22%24%24hashKey%22%3A%22object%3A356%22%7D%2C%7B%22label%22%3A%22FOOD%3AVIETNAMESE%22%2C%22id%22%3A%228%22%2C%22%24%24hashKey%22%3A%22object%3A357%22%7D%2C%7B%22label%22%3A%22FOOD%3AWINGS%22%2C%22id%22%3A%2219%22%2C%22%24%24hashKey%22%3A%22object%3A358%22%7D%2C%7B%22label%22%3A%22HAPPY%20HOUR%3AHAPPY%20HOUR%22%2C%22id%22%3A%2242%22%2C%22%24%24hashKey%22%3A%22object%3A359%22%7D%5D%2C%22oldVal%22%3A%5B%7B%22label%22%3A%22DRINKS%3ABEER%22%2C%22id%22%3A%2250%22%2C%22%24%24hashKey%22%3A%22object%3A341%22%7D%2C%7B%22label%22%3A%22DRINKS%3ACOCKTAILS%22%2C%22id%22%3A%2257%22%2C%22%24%24hashKey%22%3A%22object%3A342%22%7D%2C%7B%22label%22%3A%22DRINKS%3AWINE%22%2C%22id%22%3A%2251%22%2C%22%24%24hashKey%22%3A%22object%3A343%22%7D%2C%7B%22label%22%3A%22FOOD%3AAPPETIZERS%22%2C%22id%22%3A%2220%22%2C%22%24%24hashKey%22%3A%22object%3A344%22%7D%2C%7B%22label%22%3A%22FOOD%3ABREAKFAST%22%2C%22id%22%3A%2228%22%2C%22%24%24hashKey%22%3A%22object%3A345%22%7D%2C%7B%22label%22%3A%22FOOD%3ABRUNCH%22%2C%22id%22%3A%2226%22%2C%22%24%24hashKey%22%3A%22object%3A346%22%7D%2C%7B%22label%22%3A%22FOOD%3ACHINESE%22%2C%22id%22%3A%226%22%2C%22%24%24hashKey%22%3A%22object%3A347%22%7D%2C%7B%22label%22%3A%22FOOD%3AGREEK%22%2C%22id%22%3A%2218%22%2C%22%24%24hashKey%22%3A%22object%3A348%22%7D%2C%7B%22label%22%3A%22FOOD%3AINDIAN%22%2C%22id%22%3A%2224%22%2C%22%24%24hashKey%22%3A%22object%3A349%22%7D%2C%7B%22label%22%3A%22FOOD%3AITALIAN%22%2C%22id%22%3A%227%22%2C%22%24%24hashKey%22%3A%22object%3A350%22%7D%2C%7B%22label%22%3A%22FOOD%3ALATE%20NIGHT%22%2C%22id%22%3A%2247%22%2C%22%24%24hashKey%22%3A%22object%3A351%22%7D%2C%7B%22label%22%3A%22FOOD%3ALUNCH%22%2C%22id%22%3A%2227%22%2C%22%24%24hashKey%22%3A%22object%3A352%22%7D%2C%7B%22label%22%3A%22FOOD%3APIZZA%22%2C%22id%22%3A%225%22%2C%22%24%24hashKey%22%3A%22object%3A353%22%7D%2C%7B%22label%22%3A%22FOOD%3ASEAFOOD%22%2C%22id%22%3A%2244%22%2C%22%24%24hashKey%22%3A%22object%3A354%22%7D%2C%7B%22label%22%3A%22FOOD%3ASUSHI%22%2C%22id%22%3A%229%22%2C%22%24%24hashKey%22%3A%22object%3A355%22%7D%2C%7B%22label%22%3A%22FOOD%3ATHAI%22%2C%22id%22%3A%2211%22%2C%22%24%24hashKey%22%3A%22object%3A356%22%7D%2C%7B%22label%22%3A%22FOOD%3AVIETNAMESE%22%2C%22id%22%3A%228%22%2C%22%24%24hashKey%22%3A%22object%3A357%22%7D%2C%7B%22label%22%3A%22FOOD%3AWINGS%22%2C%22id%22%3A%2219%22%2C%22%24%24hashKey%22%3A%22object%3A358%22%7D%2C%7B%22label%22%3A%22HAPPY%20HOUR%3AHAPPY%20HOUR%22%2C%22id%22%3A%2242%22%2C%22%24%24hashKey%22%3A%22object%3A359%22%7D%5D%7D%5D%2C%5B%7B%22msg%22%3A%22fn%3A%20function%20(c%2Cd%2Ce%2Cf)%7Be%3Da(c%2C%5Cr%5Cnd%2Ce%2Cf)%3Breturn%20b(e%2Cc%2Cd)%7D%22%2C%22newVal%22%3A%5B%7B%22label%22%3A%22DRINKS%3ABEER%22%2C%22id%22%3A%2250%22%2C%22%24%24hashKey%22%3A%22object%3A341%22%7D%2C%7B%22label%22%3A%22DRINKS%3ACOCKTAILS%22%2C%22id%22%3A%2257%22%2C%22%24%24hashKey%22%3A%22object%3A342%22%7D%2C%7B%22label%22%3A%22DRINKS%3AWINE%22%2C%22id%22%3A%2251%22%2C%22%24%24hashKey%22%3A%22object%3A343%22%7D%2C%7B%22label%22%3A%22FOOD%3AAPPETIZERS%22%2C%22id%22%3A%2220%22%2C%22%24%24hashKey%22%3A%22object%3A344%22%7D%2C%7B%22label%22%3A%22FOOD%3ABREAKFAST%22%2C%22id%22%3A%2228%22%2C%22%24%24hashKey%22%3A%22object%3A345%22%7D%2C%7B%22label%22%3A%22FOOD%3ABRUNCH%22%2C%22id%22%3A%2226%22%2C%22%24%24hashKey%22%3A%22object%3A346%22%7D%2C%7B%22label%22%3A%22FOOD%3ACHINESE%22%2C%22id%22%3A%226%22%2C%22%24%24hashKey%22%3A%22object%3A347%22%7D%2C%7B%22label%22%3A%22FOOD%3AGREEK%22%2C%22id%22%3A%2218%22%2C%22%24%24hashKey%22%3A%22object%3A348%22%7D%2C%7B%22label%22%3A%22FOOD%3AINDIAN%22%2C%22id%22%3A%2224%22%2C%22%24%24hashKey%22%3A%22object%3A349%22%7D%2C%7B%22label%22%3A%22FOOD%3AITALIAN%22%2C%22id%22%3A%227%22%2C%22%24%24hashKey%22%3A%22object%3A350%22%7D%2C%7B%22label%22%3A%22FOOD%3ALATE%20NIGHT%22%2C%22id%22%3A%2247%22%2C%22%24%24hashKey%22%3A%22object%3A351%22%7D%2C%7B%22label%22%3A%22FOOD%3ALUNCH%22%2C%22id%22%3A%2227%22%2C%22%24%24hashKey%22%3A%22object%3A352%22%7D%2C%7B%22label%22%3A%22FOOD%3APIZZA%22%2C%22id%22%3A%225%22%2C%22%24%24hashKey%22%3A%22object%3A353%22%7D%2C%7B%22label%22%3A%22FOOD%3ASEAFOOD%22%2C%22id%22%3A%2244%22%2C%22%24%24hashKey%22%3A%22object%3A354%22%7D%2C%7B%22label%22%3A%22FOOD%3ASUSHI%22%2C%22id%22%3A%229%22%2C%22%24%24hashKey%22%3A%22object%3A355%22%7D%2C%7B%22label%22%3A%22FOOD%3ATHAI%22%2C%22id%22%3A%2211%22%2C%22%24%24hashKey%22%3A%22object%3A356%22%7D%2C%7B%22label%22%3A%22FOOD%3AVIETNAMESE%22%2C%22id%22%3A%228%22%2C%22%24%24hashKey%22%3A%22object%3A357%22%7D%2C%7B%22label%22%3A%22FOOD%3AWINGS%22%2C%22id%22%3A%2219%22%2C%22%24%24hashKey%22%3A%22object%3A358%22%7D%2C%7B%22label%22%3A%22HAPPY%20HOUR%3AHAPPY%20HOUR%22%2C%22id%22%3A%2242%22%2C%22%24%24hashKey%22%3A%22object%3A359%22%7D%5D%2C%22oldVal%22%3A%5B%7B%22label%22%3A%22DRINKS%3ABEER%22%2C%22id%22%3A%2250%22%2C%22%24%24hashKey%22%3A%22object%3A341%22%7D%2C%7B%22label%22%3A%22DRINKS%3ACOCKTAILS%22%2C%22id%22%3A%2257%22%2C%22%24%24hashKey%22%3A%22object%3A342%22%7D%2C%7B%22label%22%3A%22DRINKS%3AWINE%22%2C%22id%22%3A%2251%22%2C%22%24%24hashKey%22%3A%22object%3A343%22%7D%2C%7B%22label%22%3A%22FOOD%3AAPPETIZERS%22%2C%22id%22%3A%2220%22%2C%22%24%24hashKey%22%3A%22object%3A344%22%7D%2C%7B%22label%22%3A%22FOOD%3ABREAKFAST%22%2C%22id%22%3A%2228%22%2C%22%24%24hashKey%22%3A%22object%3A345%22%7D%2C%7B%22label%22%3A%22FOOD%3ABRUNCH%22%2C%22id%22%3A%2226%22%2C%22%24%24hashKey%22%3A%22object%3A346%22%7D%2C%7B%22label%22%3A%22FOOD%3ACHINESE%22%2C%22id%22%3A%226%22%2C%22%24%24hashKey%22%3A%22object%3A347%22%7D%2C%7B%22label%22%3A%22FOOD%3AGREEK%22%2C%22id%22%3A%2218%22%2C%22%24%24hashKey%22%3A%22object%3A348%22%7D%2C%7B%22label%22%3A%22FOOD%3AINDIAN%22%2C%22id%22%3A%2224%22%2C%22%24%24hashKey%22%3A%22object%3A349%22%7D%2C%7B%22label%22%3A%22FOOD%3AITALIAN%22%2C%22id%22%3A%227%22%2C%22%24%24hashKey%22%3A%22object%3A350%22%7D%2C%7B%22label%22%3A%22FOOD%3ALATE%20NIGHT%22%2C%22id%22%3A%2247%22%2C%22%24%24hashKey%22%3A%22object%3A351%22%7D%2C%7B%22label%22%3A%22FOOD%3ALUNCH%22%2C%22id%22%3A%2227%22%2C%22%24%24hashKey%22%3A%22object%3A352%22%7D%2C%7B%22label%22%3A%22FOOD%3APIZZA%22%2C%22id%22%3A%225%22%2C%22%24%24hashKey%22%3A%22object%3A353%22%7D%2C%7B%22label%22%3A%22FOOD%3ASEAFOOD%22%2C%22id%22%3A%2244%22%2C%22%24%24hashKey%22%3A%22object%3A354%22%7D%2C%7B%22label%22%3A%22FOOD%3ASUSHI%22%2C%22id%22%3A%229%22%2C%22%24%24hashKey%22%3A%22object%3A355%22%7D%2C%7B%22label%22%3A%22FOOD%3ATHAI%22%2C%22id%22%3A%2211%22%2C%22%24%24hashKey%22%3A%22object%3A356%22%7D%2C%7B%22label%22%3A%22FOOD%3AVIETNAMESE%22%2C%22id%22%3A%228%22%2C%22%24%24hashKey%22%3A%22object%3A357%22%7D%2C%7B%22label%22%3A%22FOOD%3AWINGS%22%2C%22id%22%3A%2219%22%2C%22%24%24hashKey%22%3A%22object%3A358%22%7D%2C%7B%22label%22%3A%22HAPPY%20HOUR%3AHAPPY%20HOUR%22%2C%22id%22%3A%2242%22%2C%22%24%24hashKey%22%3A%22object%3A359%22%7D%5D%7D%5D%5D at angularjs.js:6 at n.$digest (angularjs.js:131) at n.$apply (angularjs.js:133) at HTMLDocument.<anonymous> (multipledropdown.js:1) […]

AngularJS Sorting for multiple ng-repeats

I am working on creating a schedule for which we have created a JSON like following { “cancelledWeeks”: { “1511548200”: [ { “match_id”: “e06d20944182aa2b5ead43e8990e5985”, “reason”: “chhj”, “round”: 1, “team1”: “team_id_17101711595974”, “team1_captains”: { }, “team1_color_code”: “#1f1818”, “team1_name”: “17October team”, “team2”: “team_id_1710179490074”, “team2_captains”: { }, “team2_color_code”: “#302929”, “team2_name”: “cms team 4”, “time”: “6:30 PM” }, { “match_id”: “4715cf8897663e5474feaa14ef396674”, “reason”: “chhj”, “round”: 1, “team1”: “team_id_17101712185745”, “team1_captains”: { }, “team1_color_code”: “#1f0606”, “team1_name”: “october 19”, “team2”: “team_id_1710179420033”, “team2_captains”: { }, […]

Angularjs: How to order an array based on a child array of object’s Date field

I’ve got an array of arrays of objects that has the following structure: parentArr = [ [{id:1, date:1505020200000}, {id:4, date:1505020200000 }], [{id:2, date:1504681500000}], [{id:3, date:1504671000000}, {id:20, date:1504671000000}] ] Each child array will only contain dates that are the same. What I’m trying to do is use angular’s orderBy filter to to order the dates from oldest to newest, but I’m unsure of how to do it. I’ve tried setting the orderby filter to a variable […]