15. Accessing MongoDB Documents from Node.js
In the previous chapter you learned how to create and manipulate documents and how to find them by using the find()
method. This chapter takes a deeper look at accessing documents in a MongoDB collection, using the MongoDB Node.js driver module.
There is much more to accessing documents than just returning everything in a collection. This chapter covers using the query
object to limit which documents are returned as well as methods to limit the fields and number of documents in the query results. You will also get a chance to see how to count the number of documents that match query criteria without actually retrieving them from the server. This chapter also covers some advanced aggregation techniques ...
Get Node.js, MongoDB, and AngularJS Web Development now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.