📜  通过_id更新node js mongodb - Javascript代码示例

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

代码示例1
db.collection('user').update({'_id':ObjectID(req.session.loggedIn)}, {$set: {image : filename}}, {w:1}, function(err, result){
    console.log(result);