loop through mongoose.all()
const queryAllUsers = () => { //Where User is you mongoose user model User.find({} , (err, users) => { if(err) //do something... users.map(user => { //Do somethign with the user }) }) }
Source: stackoverflow.com