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

Support for inserting into specific array index

    Details

    • Type: New Feature
    • Status: Closed
    • Priority: Major - P3
    • Resolution: Duplicate
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: None
    • Labels:
      None
    • Environment:
      Any

      Description

      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']}

        Issue Links

          Activity

          Hide
          eliot Eliot Horowitz added a comment -

          Possible - syntax is tricky to get right.
          Will track demand for scheduling

          Show
          eliot Eliot Horowitz added a comment - Possible - syntax is tricky to get right. Will track demand for scheduling
          Hide
          cyranix Andrew Harrison added a comment -

          Seems to go hand in hand with SERVER-1014 ( https://jira.mongodb.org/browse/SERVER-1014 ). Hoping that you manage to figure out a way to implement these!

          Show
          cyranix Andrew Harrison added a comment - Seems to go hand in hand with SERVER-1014 ( https://jira.mongodb.org/browse/SERVER-1014 ). Hoping that you manage to figure out a way to implement these!
          Hide
          sosh bg added a comment -

          +1 Would be extremely helpful to me.

          Show
          sosh bg added a comment - +1 Would be extremely helpful to me.
          Hide
          artem Artem added a comment -

          +1 Please realize this feature!

          Show
          artem Artem added a comment - +1 Please realize this feature!
          Hide
          scotthernandez Scott Hernandez added a comment -

          dup of server-2363, which covers more.

          Show
          scotthernandez Scott Hernandez added a comment - dup of server-2363, which covers more.

            People

            • Votes:
              9 Vote for this issue
              Watchers:
              6 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:
                Days since reply:
                2 years, 33 weeks, 2 days ago
                Date of 1st Reply: