You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In the Find Project exercise, we're supposed to return documents with only the name and age properties using the MongoDB Node.js Driver.
The example provided shows a projection argument to the collection's find() method and references the documentation for this method as a resource link. However, this is the method's implementation in Mongo Shell. The find() method in NodeJS doesn't have a projection argument. Instead, a projection is applied using the project() method on the Cursor returned by find().
In the Find Project exercise, we're supposed to return documents with only the name and age properties using the MongoDB Node.js Driver.
The example provided shows a projection argument to the collection's
find()
method and references the documentation for this method as a resource link. However, this is the method's implementation in Mongo Shell. Thefind()
method in NodeJS doesn't have a projection argument. Instead, a projection is applied using theproject()
method on the Cursor returned byfind()
.An accurate example would look like this:
References:
The text was updated successfully, but these errors were encountered: