0

I'm trying for mongo db to show me only the pokemons that are Grass or Water trype, but it won't let me filter it. $or needs to be an array

Is there another way to filter an or?

1 Answers1

0

Make it an array using brackets []:

$or: [{Type_1: "Water"}, {Type_1: "Grass"}]

Documentation for $or

You don't need the $eq unless using a regular expression

Foo L
  • 10,977
  • 8
  • 40
  • 52