javascript find all duplicates in array of objects