[SERVER-4798] $pop multiple elements from an array at once Created: 27/Jan/12 Updated: 06/Dec/22 Resolved: 29/Jun/19 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | Write Ops |
| Affects Version/s: | 2.0.2 |
| Fix Version/s: | None |
| Type: | Improvement | Priority: | Minor - P4 |
| Reporter: | Michael Catanzariti | Assignee: | Backlog - Query Team (Inactive) |
| Resolution: | Won't Do | Votes: | 14 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||||||
| Assigned Teams: |
Query
|
||||||||
| Participants: | |||||||||
| Description |
|
Support
or
where n is the number of elements to remove first or last in an array. |
| Comments |
| Comment by Asya Kamsky [ 29/Jun/19 ] |
|
You can see some examples here. This can be done by using array expression $slice from aggregation. |