📜  遍历 mongoose.all() - 任何代码示例

📅  最后修改于: 2022-03-11 15:00:16.148000             🧑  作者: Mango

代码示例1
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
        })
    })
}