Answers for "update and fetch the new records in mongoose"

0

update and fetch the new records in mongoose

//                                                         V--- THIS WAS ADDED
Cat.findOneAndUpdate({age: 17}, {$set:{name:"Naomi"}}, {new: true})
Posted by: Guest on July-09-2021

Browse Popular Code Answers by Language