📌  相关文章
📜  mongoose 获取价值 - Javascript 代码示例

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

代码示例1
var Model = mongoose.model('Model', new mongoose.Schema({}))
Model.find({user_id: '1234'}, function(err, obj) {   
    console.log(obj[0].user_id)  // undefined                   
    console.log(obj[0].toObject().user_id)  // 1234     
})