How can I create an array containing the values of people that have the same office
const arr = [
{ "officeID": "1", "people": 10},
{ "officeID": "2", "people": 10 },
{ "officeID": "1", "people": 20 }
]
The intented outcome should be an array[10,20] containing the values of people that have the same office id