Issue chaining search query helpers to narrow search results

Tell us what’s happening:
Trying to complete the MongoDB and Mongoose - Chain Search Query Helpers to Narrow Search Results challenge but I keep failing the test. I figure there’s somewhere I’ve gone wrong, i just can’t see where.

Your code so far
link to my code

Your browser information:

User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/85.0.4183.121 Safari/537.36.

Challenge: Chain Search Query Helpers to Narrow Search Results

Link to the challenge:

Hello!

The challenge doesn’t say it, but the results must be sorted in ascending order, so you should change the sort order to 1:

sort({ name: 1 })

Same as above:

sort('name')
sort({ name: 'ascending' })

See the documentation for more information.

2 Likes

Hello!

Thank you! I can finally get started on the certification projects

1 Like