Uploaded image for project: 'Core Server'
  1. Core Server
  2. SERVER-1824

Support for inserting into specific array index

    • Type: Icon: New Feature New Feature
    • Resolution: Duplicate
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: None
    • Component/s: None
    • None
    • Environment:
      Any

      Hi guys,

      Would a $insert_at operator for an array be possible? Something like:

      given a document:

      { a : [ 'one', 'three' ] }

      the update: { $insert_at : { a :

      { 1 : 'two' }

      }}

      results in:

      { a : ['one', 'two', 'three']}

            Assignee:
            Unassigned Unassigned
            Reporter:
            leshill Les Hill
            Votes:
            9 Vote for this issue
            Watchers:
            7 Start watching this issue

              Created:
              Updated:
              Resolved: