Veeva Systems interview question

Group similar objects within an array