mongodb rename a field in all documents code example Example: mongodb change key name db.students.updateMany( {}, { $rename: { "nmae": "name" } } )