leodinas-hao / mongoose-query-parser

Convert url query string to MongooseJs friendly query object including advanced filtering, sorting, population, string template, type casting and many more...
MIT License
68 stars 17 forks source link

Filtering does not work when value is a boolean array #19

Closed anandmidx9 closed 2 years ago

anandmidx9 commented 2 years ago

Consider a filter like:

someEndPoint?filter={"field":{"$in":[false,true]}}

The Mongoose Query Parser incorrectly parses this filter to be:

{filter: { field: { '$in': [] }}}

anandmidx9 commented 2 years ago

Works with someEndPoint?filter=false,true