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

Add $of for iterating over object keys

    XMLWordPrintableJSON

Details

    • New Feature
    • Status: Closed
    • Major - P3
    • Resolution: Duplicate
    • None
    • None
    • Querying
    • None
    • Query

    Description

      In many languages you have the ability iterate over objects in the same way as you iterate arrays. In ES6 the simple example is for...of where its equivalent for array is for...in

      https://developer.mozilla.org/en/docs/Web/JavaScript/Reference/Statements/for...of

      we already have $in for iterating our query across an array, could we add $of to do the same against objects in a document?

      Attachments

        Issue Links

          Activity

            People

              backlog-server-query Backlog - Query Team (Inactive)
              daniel.morrison#1 daniel.morrison#1
              Votes:
              0 Vote for this issue
              Watchers:
              7 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: