Answers for "mongodb change field name"

3

mongodb change key name

db.students.updateMany( {}, { $rename: { "nmae": "name" } } )
Posted by: Guest on July-10-2020
2

update field name in mongodb

// false,true is set for =>{upsert:false, multi:true}
db.foo.update({}, {$rename:{"name.additional":"name.last"}}, false, true);
Posted by: Guest on August-11-2021

Code answers related to "Javascript"

Browse Popular Code Answers by Language