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

Allow projection on array elements

    • Type: Icon: New Feature New Feature
    • Resolution: Done
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: None
    • Component/s: None
    • Labels:
      None
    • Fully Compatible

      It would be great if field specification could limit automatically array elements. So that you could do something like:

      ```
      db.foo.find({},

      {'bar.0'}

      )
      ```

      And get from:

      ```

      {bar: ['a', 'b', 'c']}

      ```

      This result:

      ```

      {bar: 'a'}

      ```

            Assignee:
            Unassigned Unassigned
            Reporter:
            mitar NOVALUE Mitar
            Votes:
            0 Vote for this issue
            Watchers:
            7 Start watching this issue

              Created:
              Updated:
              Resolved: