I am using Angular for the first time, and i think i may have misunderstood how easy it is using this framework to calculate things like occurrence of nodes and node values.
I would like to be able to count for example the number of times the pant size for a player is 42.
Is this something that is easily possible with angular, in other words is there some quick call in the framework which counts occurrences of node values, or does it require a custom function with collections and key/value pairs?
function MyCtrl($scope) {
$scope.players = [
{shirt: 'XXL', pants: '42', shoes: '12'},
{shirt: 'XL', pants: '38', shoes: '10'},
{shirt: 'M', pants: '32', shoes: '9'},
{shirt: 'XXL', pants: '42', shoes: '12'},
{shirt: 'XXL', pants: '42', shoes: '12'},
{shirt: 'XXL', pants: '42', shoes: '12'}
];
}
In this fiddle i have utilized the help of another SO discussion to aggregate distinct node values. Now i would like help on the best practices for occurrence counts.