sorry for the lack of code — but this is a pretty straight forward javascript question.
I need to sort through an array of objects and push objects with the same key/value pair to a new array.
The objects i'm sorting through are football players. I have all players in an array of objects and want to push each position into their own array.
Ex. each object has a key of "position" so any object with the value of "QB" for the key "position" should be pushed into a new array "Quarterbacks".
What's the right way to sort through objects and push them into a new array that would work for my scenario?