MongoDB and Mongoose - Chain Search Query Helpers to Narrow Search Results

Tell us what’s happening:
Describe your issue in detail here.
i dont know wher is my problem to fix it

var queryChain = (done) => {
var foodToSearch = “burrito”;
Person.find(foodToSearch)
.sort({name: “sac”})
.limit(5)
.select({age: 0})
.exec((err, data) =>{
console.log(data)
done(null, data);
});
};

Your browser information:

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

Challenge: MongoDB and Mongoose - Chain Search Query Helpers to Narrow Search Results

Link to the challenge:

Not sure what error your getting, but I believe the challenge mentioned to limit documents to 2, but you limited to 5, not sure what “sac” is in sort, and it doesn’t look like you specified what field you wanted to search in your person find function.

1 Like

This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.