You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I try to write aggregation with $slice and split an array and use another expression for itemCount. But current ArrayOperators.Slice supports only int for offset and itemCount. These values can be also expression see https://www.mongodb.com/docs/manual/reference/operator/aggregation/slice/
For example I would like to slice an array myArray and remove the last item from this array:
I try to write aggregation with
$slice
and split an array and use another expression for itemCount. But currentArrayOperators.Slice
supports only int for offset and itemCount. These values can be also expression see https://www.mongodb.com/docs/manual/reference/operator/aggregation/slice/For example I would like to slice an array
myArray
and remove the last item from this array:I would like to write it like this:
The text was updated successfully, but these errors were encountered: