I am having coming up with a logic to group similar items.
I have tried looping through the array and extracting the group value but problem I ran into was finding a way to associate it with the other key/value pair in the object.
input = [{
group: 1,
name: 'bob'
}, {
group: 1,
name: 'bob'
}, {
group: 0,
name: 'mike'
}]
output = [{
1: ['bob', 'bob']
}, {
0: ['mike']
}]