I have some users in the mongodb/mongoose database and I want to put all their names of people in the same zip code into an array.
var namesArray = [];
Users.find({ zip: '55555' }, function ( err, people ) {
for ( i = 0, i < people.length, i++ ) {
namesArray[i] = people.name // How do I specify which person to use if they're all being returned at once?
};
});