How to remove a field completely from a MongoDB document?
{
name: 'book',
tags: {
words: ['abc','123'],
lat: 33,
long: 22
}
}
Suppose this is a document. How do I remove "words
" completely from all the documents in this collection? I want all documents to be without "words
":
{
name: 'book',
tags: {
lat: 33,
long: 22
}
}