$cmp (aggregation)

$cmp

Takes two values in an array and returns an integer. The returned value is:

  • A negative number if the first value is less than the second.
  • A positive number if the first value is greater than the second.
  • 0 if the two values are equal.

MongoDB Manual (Index)

关于

生态系统

格式

资源