Answers for "mongodb rename collection field"

2

mongodb rename field

db.products.updateMany({}, {
  $rename: { "foo": "bar" }
})
Posted by: Guest on January-19-2022
-1

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