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

Comment on: "manual/tutorial/project-fields-from-query-results.txt"

    XMLWordPrintableJSON

Details

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Major - P3 Major - P3
    • Server_Docs_20231030
    • None
    • manual

    Description

      Was wondering about how to limit fields from a subdocument. Turns out, I can specify the field using dot notation, e.g.

      db.users.find(

      {name:"Jim"}

      ,{_id:0, subdoc.field:0 })

      but I had to search StackOverflow and experiment to find that functionality, rather than finding it in the docs. Thought you might like to know that someone was looking here for that, and they didn't find it.

      Attachments

        Activity

          People

            ravind.kumar Ravind Kumar (Inactive)
            xgen-internal-docs Docs Collector User (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:
              8 years, 19 weeks ago