i have an array of objects that i want to count by cs parameters and fine how many tt in each cs?
const object : [
0:{cs:56 ,tt:'aaa'},
1:{cs:23 , tt:'bbb'},
2:{cs:56 ,tt: 'ppp'},
3:{cs:56 ,tt: 'sss'},
4:{cs:23 , tt:'rrr'}]
enter code here
// and final result that I except is
// finallObject ={cs:23,count:2},{cs:56 ,count:3}