Need Assistance?

support@tutorialshub.in

Query & Logical Operators

Comparison Operators ($gt, $lt, $in, $ne)

ADVERTISEMENT
MongoDB Free Lesson
5 min read
ADVERTISEMENT

MongoDB query operators begin with a $ sign. Comparison operators let you match ranges and sets of values:

  • $eq / $ne — Equal / Not equal
  • $gt / $gte — Greater than / Greater than or equal
  • $lt / $lte — Less than / Less than or equal
  • $in / $nin — Matches any value in an array / Not in array
ADVERTISEMENT
Hi, I'm Tuby! Here to help you