-
Type: New Feature
-
Resolution: Duplicate
-
Priority: Major - P3
-
None
-
Affects Version/s: None
-
Component/s: Write Ops
-
None
Inserting an item of any type into a specific postion into existing array structure
Currently $push only appends data to an array.
But there is no function to insert an array into a specific postion.
Example data (Python array)
Before:
[ [Item1, 0, 0], [Item2, 0, 0].. ] # Array items inside an array
Command for example can be
{ '$insert':
} # At position 1 of the myArray
Result:
[ [Item1, 0,0], [Item3, 0,0], [Item2, 0,0] ]
$push is out of question as the data should be inserted to keep a order of the items.
- duplicates
-
SERVER-2363 $push/$pushAll support for insertion at any position (top/bottom/ordinal)
- Closed