Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

Mongoose multi update req.body

Label.update({'_id': { $in: post.labelIds }}, {$addToSet: {postIds:req.body.id}}, {multi: true}).exec()
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #Mongoose #multi #update
ADD COMMENT
Topic
Name
4+1 =