Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

$unset mongodb

Users.updateMany({ first_name: { $exists: true } }, { $unset: { first_name: '' } });

// remove from all documents first_name field
 
PREVIOUS NEXT
Tagged: #mongodb
ADD COMMENT
Topic
Name
2+2 =