In Chapter 14, “Manipulating MongoDB Documents from Node.js,” you learned how to create and manipulate documents and got a brief glimpse into finding them 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 also 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 ...