MongoDB $unset
How to remove property from mongoDB document ?
By using $unset we can remove property from mongo document
{
name:"codelearningpoint",
text:'xyz'
}
if I want to remove the test property from the document , using $unset we can do that.
$unset can be use only with update functions updateOne() , updateMany()
db.collection.updateOne( {name:"codelearningpoing"} ,{$unset:{text:''}} )