Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

Update data using mongoose

const res = await Person.updateOne({ name: 'Jean-Luc Picard' }, { ship: 'USS Enterprise' });
res.n; // Number of documents matched
res.nModified; // Number of documents modified
Source by mongoosejs.com #
 
PREVIOUS NEXT
Tagged: #Update #data #mongoose
ADD COMMENT
Topic
Name
6+9 =