Chain Search Query Helpers to Narrow Search Results

Do you understand the reason why this is not working?

const queryChain = (done) => {
  const foodToSearch = "burrito";
        Person.find({favoriteFoods: foodToSearch}).sort({name:"asc"}).limit(2).select({age:0}).exec(function(err,data){
                  return done(err)

This is the link here: boilerplate-mongomongoose - Replit

What are you trying to accomplish? In what way is it not working? What have you learned from your debugging so far?

1 Like

Your code is passing for me.

  • Are you getting any errors?

  • What does the network tab tell you?


1 Like

My database was unconnected.

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