Key Takeaways About $lt Operator

  • MongoDB $lt operator also known as less than operator is a comparison operator.
  • It selects the documents where value of specific field is less than the given value.
  • It can only compare similar data types. for example, string data type can not be compared with integer.
  • It is useful for filtering wide range of documents.

MongoDB – $lt Operator

MongoDB $lt operator or less than operator is one of the comparison operators. The $lt operator selects the documents with a value less than (<) the given value.

You can use this operator in methods like, find(), update(), etc. as per your requirements.

Similar Reads

Syntax

{field: {$lt: value}}...

MongoDB $lt Operator Example

In the following examples, we are working with:...

Key Takeaways About $lt Operator

MongoDB $lt operator also known as less than operator is a comparison operator. It selects the documents where value of specific field is less than the given value. It can only compare similar data types. for example, string data type can not be compared with integer. It is useful for filtering wide range of documents....

Contact Us