Returns an aggregation of the minimum value n elements within a group. If the group contains fewer than n elements, $minN returns all elements in the group.

  • Parameters

    • collection: unknown[]

      The input array

    • expr: unknown

      The right-hand side expression value of the operator

    • options: Options

      The options to use for this operation

    Returns unknown