I have a array with objects like this:
{
__v: 0,
_id: "5835ced6ffb2476119a597b9",
castvote: 1,
time: "2016-11-23T17:16:06.676Z",
userid: "57e0fa234f243f0710043f8f"
}
How can I make a new array that would filter them by the castvote - like an array containing the objects where castvote is 1, and one where castvote is 2?