@@ -77,8 +77,8 @@ of matching documents:
77
77
.. output::
78
78
:visible: false
79
79
80
- {"_id": {"$oid": " ..."} , "borough": "Manhattan", "cuisine": "American", "name": "Emerald Pub"}
81
- {"_id": {"$oid": " ..."} , "borough": "Queens", "cuisine": "American", "name": "Emerald Pub"}
80
+ {"_id"=>BSON::ObjectId(' ...') , "borough"=> "Manhattan", "cuisine"=> "American", "name"=> "Emerald Pub"}
81
+ {"_id"=>BSON::ObjectId(' ...') , "borough"=> "Queens", "cuisine"=> "American", "name"=> "Emerald Pub"}
82
82
83
83
When you use a projection to specify fields to include in the return
84
84
document, the ``_id`` field is also included by default. All other fields are
@@ -108,8 +108,8 @@ excludes the ``_id`` field from the projection:
108
108
.. output::
109
109
:visible: false
110
110
111
- {"borough": "Manhattan", "cuisine": "American", "name": "Emerald Pub"}
112
- {"borough": "Queens", "cuisine": "American", "name": "Emerald Pub"}
111
+ {"borough"=> "Manhattan", "cuisine"=> "American", "name"=> "Emerald Pub"}
112
+ {"borough"=> "Queens", "cuisine"=> "American", "name"=> "Emerald Pub"}
113
113
114
114
Specify Fields to Exclude
115
115
~~~~~~~~~~~~~~~~~~~~~~~~~
@@ -139,10 +139,10 @@ in the result:
139
139
.. output::
140
140
:visible: false
141
141
142
- {"_id": {"$oid": " ..."} , "borough": "Manhattan", "cuisine": "American",
143
- "grades": [...] , "restaurant_id": "40367329"}
144
- {"_id": {"$oid": " ..."} , "borough": "Queens", "cuisine": "American",
145
- "grades": [...] , "restaurant_id": "40668598"}
142
+ {"_id"=>BSON::ObjectId(' ...') , "borough"=> "Manhattan", "cuisine"=> "American",
143
+ "name"=>"Emerald Pub" , "restaurant_id"=> "40367329"}
144
+ {"_id"=>BSON::ObjectId(' ...') , "borough"=> "Queens", "cuisine"=> "American",
145
+ "name"=>"Emerald Pub" , "restaurant_id"=> "40668598"}
146
146
147
147
When you use a projection to specify which fields to exclude,
148
148
any unspecified fields are implicitly included in the return document.
0 commit comments