I am currently using ng-repeat
to showcase data and I want to be able to determine which name appears most frequently in each item (or multiple names if there are ties).
I have not come across an angular directive that can do this automatically. Is there one available?
Here is a sample dataset:
{
item1: [{
name: 'Bob',
date: '2015-12-17'
}, {
name: 'Steve',
date: '2015-12-17'
}, {
name: 'Bob',
date: '2015-12-15'
}, {
name: 'Steve',
date: '2015-12-13'
}, {
name: 'Bob',
date: '2015-12-10'
}],
item2: [{
name: 'Rachel',
date: '2015-12-14'
}, {
name: 'Steve',
date: '2015-12-17'
}, {
name: 'Bob',
date: '2015-12-15'
}]
}