allow limit in $filter expression

XMLWordPrintableJSON

    • Fully Compatible
    • QO 2021-09-06, Query Optimization 2021-08-09, QO 2021-09-20, QO 2021-10-04, QO 2021-10-18, QO 2021-11-01, QO 2021-08-23
    • None
    • 3
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      Currently $filter expression will return all matching array elements of its input.

      This is a request to add a "limit" option which caps the number of matches returned.

      {$filter:{
          input:[1,2,3,10,11,12,15],
          cond:{$lt:["$$this", 13]},
          limit: 2
      }}
      // result
      [1,2]
      

              Assignee:
              Maddie Zechar
              Reporter:
              Asya Kamsky
              Votes:
              0 Vote for this issue
              Watchers:
              11 Start watching this issue

                Created:
                Updated:
                Resolved: