June 2014
Intermediate to advanced
696 pages
38h 52m
English
Typically you delete documents from a collection through your Node.js application. However, there may be times when you need to manually remove a document from an administrative point of view to fix a database or for testing purposes.
To remove documents from a collection, you need to get the collection object and then call the remove(query) method on that object. The optional query parameter specifies a query document with fields and values to match documents against in the collection. The documents that match the query are removed from the collection. Using the remove() method with no query parameter removes all documents from the collection. For example, the following commands first remove documents where ...
Read now
Unlock full access