Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

node js mongodb update by _id

db.collection('user').update({'_id':ObjectID(req.session.loggedIn)}, {$set: {image : filename}}, {w:1}, function(err, result){
    console.log(result);
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #node #js #mongodb #update
ADD COMMENT
Topic
Name
9+3 =