0

Im using the module mongoose.js for my mongodb database. My data base looks like this:

{
  thing1: "thing1",
  thing2: "thing2"
}

And I want to search a model with several parameters (thing1 and thing2). I tried this:

myModel.findOne({ thing1: "thing1", thing2: "thing2" });

But it returned undefined. So i searched on the mongoosejs docs, and then i tried this:

myModel.find({ thing1: "thing1", thing2: "thing2" });

But it returned an empty array.

What should i do?

Zitta
  • 74
  • 7

1 Answers1

0

I didn't declared the "thing2" in my model

Zitta
  • 74
  • 7