Quantcast
Channel: $or Operator in Mongoose - Stack Overflow
Browsing latest articles
Browse All 2 View Live

Answer by Đăng Khoa Đinh for $or Operator in Mongoose

I think the problem is because you wrap the regular expression in ``, which is understood as a string. You can try this way:const queryWordRegex = new RegExp(body.queryWord, "i");const query = {$or: [...

View Article


$or Operator in Mongoose

I am using the $or operator in mongoose for searching through the name and description fields of the database. I want to check if the queryWord string contains any part of the database field(s). This...

View Article

Browsing latest articles
Browse All 2 View Live


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>