Uploaded image for project: 'Documentation'
  1. Documentation
  2. DOCS-16471

Investigate changes in SERVER-74371: Support arbitrary expressions for 'field' parameter for $getField

    • 2

      Original Downstream Change Summary

      $getField now supports expressions for the 'field' option; before it only accepted constant string

      Description of Linked Ticket

      The $getField operator only supports expressions that resolve to string literals. This ticket is requesting an expansion to $getField that would support any expressions that resolve to string values. For example,

      { $getField: { field: { $toString: "$num" }, input: "$doc" } }

            Assignee:
            sarah.simpers@mongodb.com Sarah Simpers
            Reporter:
            backlog-server-pm Backlog - Core Eng Program Management Team
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved:
              26 weeks, 6 days ago