AngularJS: JSON array from Filter -


i have quick question. have filter pass array , array:

the filter returns json array generated underscore.js library:

myapp.filter('thefilter', function () {         return function(items){             return _.countby(items, function(num) {               return num % 2 == 0 ? 'even': 'odd';             });         }; }); 

this {{array | thefilter }} outputs json array this: {{ "even":3, "odd":5 }}

how can output value of example?

thanks , best regards

i tried, works perfectly

{{(items | thefilter).even}} 

worked plnkr


Popular posts from this blog