JavaScript: Group an array according to type
const array = [
{ type: 'A', status:'Approved' },
{ type: 'A', status:'Approved' },
{ type: 'A', status:'Disapproved' },
{ type: 'A', status:'Disapproved' },
{ type: 'A', status:'Processing' },
{ type: 'B', status:'Processing' },
{ type: 'B', status:...
harikrishna.hashnode.dev1 min read