Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

mongodb replace document

try {
   db.restaurant.replaceOne(
      { "name" : "Central Perk Cafe" },
      { "name" : "Central Pork Cafe", "Borough" : "Manhattan" }
   );
} catch (e){
   print(e);
}
Source by docs.mongodb.com #
 
PREVIOUS NEXT
Tagged: #mongodb #replace #document
ADD COMMENT
Topic
Name
7+3 =