String Operators

OperatorDescriptionExample
$concatConcatenates two or more string properties or expressions in the passed in array.{“$concat”: [“name.first”, {“$string”: “ ”}, “name.last”]}
$substrReturns a portion of a string. Takes an array of three elements: source string, integer start index and integer length. The integer values can be literals, properties, or expressions.{“$substr”: [“c_desc”, 0, 20]}
$toLowerReturns a lowercase version of the string argument.{“$toLower”: “c_title”}
$toUpperReturns an uppercase version of the string argument.{“$toUpper”: “c_title”}
$strcasecmpPerforms a case-insensitive string comparison. Returns 0 if the two passed in array values are equivalent, 1 if the first value is greater than the second, -1 if the second value is greater than the first.{“$strcasecmp”: [“name.first”, {“$string”: “J”}]}