KeyTakeAways About MongoDB $toLower Operator

  • The MongoDB $toLower operator in is used in the aggregation pipeline stages to convert a string to lowercase and return the result.
  • It accepts an expression as an argument, which can be any expression that resolves to a string.
  • If the argument provided to $toLower resolves to null, it returns an empty string.
  • $toLower only has a well-defined behavior for strings of ASCII characters.
  • The $toLower operator is designed for use within the aggregation framework and is not used directly in update operations to modify documents in a collection.

MongoDB $toLower Operator

MongoDB $toLower operator converts the given string to lowercase.

Similar Reads

$toLower Operator in MongoDB

The $toLower operator in MongoDB is used in aggregation pipeline stages to convert a string to lowercase and return it....

Syntax

{ $toLower: }...

MongoDB $toLower Operator Examples

To understand it better, let’s look at some examples of MongoDB $toLower Operator....

KeyTakeAways About MongoDB $toLower Operator

The MongoDB $toLower operator in is used in the aggregation pipeline stages to convert a string to lowercase and return the result. It accepts an expression as an argument, which can be any expression that resolves to a string. If the argument provided to $toLower resolves to null, it returns an empty string. $toLower only has a well-defined behavior for strings of ASCII characters. The $toLower operator is designed for use within the aggregation framework and is not used directly in update operations to modify documents in a collection....

Contact Us