I have an array that I want to group according to type then count the number of instances for every unique status.
Here is my array:
const array =