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

Support Boolean field #32

Open chintanshahts opened 9 months ago

chintanshahts commented 9 months ago

Input:

req.query = {
    is_public: false
}

output:

{
   filter: {
       is_public : {$exists: false}
  }
}

Expected Output:

{
   filter: {
       is_public : false
  }
}