{"id":992,"date":"2011-06-16T10:17:53","date_gmt":"2011-06-16T14:17:53","guid":{"rendered":"http:\/\/www.matthewgkeller.com\/blog\/?p=992"},"modified":"2011-11-08T08:48:31","modified_gmt":"2011-11-08T13:48:31","slug":"dear-mongodb","status":"publish","type":"post","link":"http:\/\/www.matthewgkeller.com\/blog\/2011\/06\/16\/dear-mongodb\/","title":{"rendered":"Dear MongoDB"},"content":{"rendered":"<p>Dear <a href=\"http:\/\/www.mongodb.org\/\">MongoDB<\/a>,<\/p>\n<p>I would like to use the <a href=\"http:\/\/www.mongodb.org\/display\/DOCS\/Updating#Updating-The%24positionaloperator\">positional operators you have for updates<\/a>, ala &#8216;user.$.name&#8217;, in the field selectors for queries, ala find({&#8220;user.name&#8221;: &#8220;Matt&#8221;},{&#8220;user.$.address&#8221;}) such that I can see only the fields of that sub-document\/sub-object in my return data instead of having to return &#8220;user.address&#8221; which may have thousands of results, and then filter it in code before returning it the application.<\/p>\n<p>Yes, I know I could have a different document model, but I don&#8217;t always get to pick that. This would be awesome.<\/p>\n<p>Thank you for all the fun,<br \/>\nM@<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Dear MongoDB, I would like to use the positional operators you have for updates, ala &#8216;user.$.name&#8217;, in the field selectors for queries, ala find({&#8220;user.name&#8221;: &#8220;Matt&#8221;},{&#8220;user.$.address&#8221;}) such that I can see only the fields of that sub-document\/sub-object in my return data &hellip; <a href=\"http:\/\/www.matthewgkeller.com\/blog\/2011\/06\/16\/dear-mongodb\/\">Continue reading <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[4,5,10,17],"tags":[59,94],"class_list":["post-992","post","type-post","status-publish","format-standard","hentry","category-architecture","category-general-coding","category-linuxy","category-work","tag-linux","tag-mongo"],"_links":{"self":[{"href":"http:\/\/www.matthewgkeller.com\/blog\/wp-json\/wp\/v2\/posts\/992","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/www.matthewgkeller.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/www.matthewgkeller.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/www.matthewgkeller.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/www.matthewgkeller.com\/blog\/wp-json\/wp\/v2\/comments?post=992"}],"version-history":[{"count":0,"href":"http:\/\/www.matthewgkeller.com\/blog\/wp-json\/wp\/v2\/posts\/992\/revisions"}],"wp:attachment":[{"href":"http:\/\/www.matthewgkeller.com\/blog\/wp-json\/wp\/v2\/media?parent=992"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/www.matthewgkeller.com\/blog\/wp-json\/wp\/v2\/categories?post=992"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/www.matthewgkeller.com\/blog\/wp-json\/wp\/v2\/tags?post=992"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}