I have an array like
[
{date:'1/8/14',code:'AV-502'},
{date:'1/8/14',code:'AV-501'},
{date:'2/8/14',code:'AV-502'},
{date:'2/8/14',code:'AV-501'},
{date:'2/8/14',code:'AV-502'}
]
How can I get the count of each code for a date ie count of AV-502
for date 1/8/14
and the same for 2/8/14
and so on in jquery.
The result needed is like
[
{date:'1/8/14',code:'AV-502',count:2},
{date:'1/8/14',code:'AV-501',count:3},
{date:'2/8/14',code:'AV-501',count:5}
]