For example:
array = [{name:'Anna'}, {name:'Bob'}, {name:'Joe'}, {name:'Anna'}]
I am looking to group this array based on the name attribute in order to create separate arrays like:
array 1 = [{name:'Anna'}, {name:'Anna'}]
array 2 = [{name:'Joe'}]
array 3 = [{name:'Bob'}]
Any suggestions on how I can achieve this? Thank you!