Javascript reduce array of objects and return distinct array of objects
I have an array of invoice objects that I want to turn into a distinct array of just the supplier ID, supplier name and a reduced total across all the invoices from each distinct supplier where the status equals 3.…