[DOCS-5621] Comment on: "manual/tutorial/project-fields-from-query-results.txt" Created: 12/Jun/15  Updated: 15/Jun/15  Resolved: 15/Jun/15

Status: Closed
Project: Documentation
Component/s: None
Affects Version/s: None
Fix Version/s: None

Type: Bug Priority: Major - P3
Reporter: Docs Collector User (Inactive) Assignee: Kay Kim (Inactive)
Resolution: Done Votes: 0
Labels: collector-298ba4e7
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

Location: http://docs.mongodb.org/manual/tutorial/project-fields-from-query-results/
User-Agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/43.0.2357.65 Safari/537.36
Referrer: http://docs.mongodb.org/manual/tutorial/limit-number-of-elements-in-updated-array/
Screen Resolution: 1920 x 1200
repo: docs
source: tutorial/project-fields-from-query-results


Participants:
Days since reply: 8 years, 35 weeks, 2 days ago

 Description   

This document fails to describe how to limit fields to those nested in objects.

e.g.

{
_id: 0,
session: 5
data:

{ x: 0, y: 0 }

}

db.stats.find(

{session: 5}

, {fields:

{ "data.x": 1, "data.y": 1 }

);

Is it even possible to flatten the fields so my results are

{x, y}

instead of {data: {x,y}}?

Reporter: concerned citizen



 Comments   
Comment by Githook User [ 15/Jun/15 ]

Author:

{u'username': u'kay-kim', u'name': u'kay', u'email': u'kay.kim@10gen.com'}

Message: DOCS-5621 add embedded field example
Branch: master
https://github.com/mongodb/docs/commit/6d0071e3857557b824bd13314e08b29b5e4fae8c

Comment by Githook User [ 15/Jun/15 ]

Author:

{u'username': u'kay-kim', u'name': u'kay', u'email': u'kay.kim@10gen.com'}

Message: DOCS-5621 add embedded field example
Branch: v2.6
https://github.com/mongodb/docs/commit/bab9534fc0fc0e5e39653ff538a4f623f3b1b932

Generated at Thu Feb 08 07:50:40 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.