mongodb delete document field code example
Example: mongodb delete document where field exists
db.users.remove({
"$or": [
{ "firstName": { "$exists": false } },
{ "lastName": { "$exists": false } }
]
})
db.users.remove({
"$or": [
{ "firstName": { "$exists": false } },
{ "lastName": { "$exists": false } }
]
})