@@ -38,11 +38,11 @@ not currently exist, insert operations will create the collection):
3838
3939.. code-block:: javascript
4040
41- db.students.insertMany([
41+ db.students.insertMany( [
4242 { _id: 1, test1: 95, test2: 92, test3: 90, modified: new Date("01/05/2020") },
4343 { _id: 2, test1: 98, test2: 100, test3: 102, modified: new Date("01/05/2020") },
4444 { _id: 3, test1: 95, test2: 110, modified: new Date("01/04/2020") }
45- ])
45+ ] )
4646
4747To verify, query the collection:
4848
@@ -86,10 +86,10 @@ currently exist, insert operations will create the collection):
8686
8787.. code-block:: javascript
8888
89- db.students2.insertMany([
89+ db.students2.insertMany( [
9090 { "_id" : 1, quiz1: 8, test2: 100, quiz2: 9, modified: new Date("01/05/2020") },
9191 { "_id" : 2, quiz2: 5, test1: 80, test2: 89, modified: new Date("01/05/2020") },
92- ])
92+ ] )
9393
9494To verify, query the collection:
9595
@@ -152,11 +152,11 @@ currently exist, insert operations will create the collection):
152152
153153.. code-block:: javascript
154154
155- db.students3.insert( [
155+ db.students3.insertMany( [
156156 { "_id" : 1, "tests" : [ 95, 92, 90 ], "modified" : ISODate("2019-01-01T00:00:00Z") },
157157 { "_id" : 2, "tests" : [ 94, 88, 90 ], "modified" : ISODate("2019-01-01T00:00:00Z") },
158158 { "_id" : 3, "tests" : [ 70, 75, 82 ], "modified" : ISODate("2019-01-01T00:00:00Z") }
159- ]);
159+ ] );
160160
161161To verify, query the collection:
162162
@@ -221,11 +221,11 @@ not currently exist, insert operations will create the collection):
221221
222222.. code-block:: javascript
223223
224- db.students4.insertMany([
224+ db.students4.insertMany( [
225225 { "_id" : 1, "quizzes" : [ 4, 6, 7 ] },
226226 { "_id" : 2, "quizzes" : [ 5 ] },
227227 { "_id" : 3, "quizzes" : [ 10, 10, 10 ] }
228- ])
228+ ] )
229229
230230To verify, query the collection:
231231
@@ -267,11 +267,11 @@ insert operations will create the collection):
267267
268268.. code-block:: javascript
269269
270- db.temperatures.insertMany([
270+ db.temperatures.insertMany( [
271271 { "_id" : 1, "date" : ISODate("2019-06-23"), "tempsC" : [ 4, 12, 17 ] },
272272 { "_id" : 2, "date" : ISODate("2019-07-07"), "tempsC" : [ 14, 24, 11 ] },
273273 { "_id" : 3, "date" : ISODate("2019-10-30"), "tempsC" : [ 18, 6, 8 ] }
274- ])
274+ ] )
275275
276276To verify, query the collection:
277277
@@ -319,8 +319,6 @@ See also the various update method pages for additional examples:
319319
320320- :ref:`db.collection.updateMany <updateMany-example-agg>`
321321
322- - :ref:`db.collection.update() <update-example-agg>`
323-
324322- :ref:`db.collection.findOneAndUpdate() <findOneAndUpdate-agg-pipeline>`
325323
326324- :ref:`db.collection.findAndModify() <findAndModify-agg-pipeline>`
0 commit comments