Answers for "mongodb rename a field"

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
0

mongodb rename property

db.getCollection('posts').update({}, {$rename: { 'comments': 'texts'}} , {multi: true});
Posted by: Guest on March-22-2021

Code answers related to "Javascript"

Browse Popular Code Answers by Language