June 2014
Intermediate to advanced
696 pages
38h 52m
English
Once objects have been inserted into a collection, you may need to update them from time to time as the data changes. The MongoDB Node.js driver provides several great methods for updating documents. The most commonly used is the update() method, which is versatile and yet fairly easy to implement. The following is the syntax for the update() method:
update(query, update, [options], [callback])
The query parameter is a document that is used to identify which document(s) you want to change. The request matches the properties and values in the query parameter with the fields and values of the object, and only those that match the query are updated. The update parameter is an object ...
Read now
Unlock full access