Details
-
Bug
-
Resolution: Done
-
Major - P3
-
None
-
using the ruby mongo driver on yosemite 10.10.2
*Location*: http://docs.mongodb.org/manual/tutorial/project-fields-from-query-results/
*User-Agent*: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_10_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/40.0.2214.111 Safari/537.36
*Referrer*: http://docs.mongodb.org/manual/search/?query=projection
*Screen Resolution*: 2560 x 1440
*repo*: docs
*source*: tutorial/project-fields-from-query-results
using the ruby mongo driver on yosemite 10.10.2 *Location*: http://docs.mongodb.org/manual/tutorial/project-fields-from-query-results/ *User-Agent*: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_10_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/40.0.2214.111 Safari/537.36 *Referrer*: http://docs.mongodb.org/manual/search/?query=projection *Screen Resolution*: 2560 x 1440 *repo*: docs *source*: tutorial/project-fields-from-query-results
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.