Filtering of collections with multiple OR options


I am creating what I think to be a complex search / filtering option for a collection and need some assistance. Looking to create a filter that allows an “OR” function on a specific field.

Trying to have something like the following return results when the “make” field equals any of these options, however as soon as I specify 1 value for “make” I get a blank collection.

VehiclesJson.find({“make”:[“KIA”,“Chrysler”,“Nissan”]},{sort: sortBy});

Currently not working filters:



answer is $in, check in mongodb docs

Thank you. Looks like that will work.

1 Like