File tree Expand file tree Collapse file tree 1 file changed +7
-2
lines changed Expand file tree Collapse file tree 1 file changed +7
-2
lines changed Original file line number Diff line number Diff line change @@ -328,7 +328,7 @@ arrays. Consider a collection that contains documents with a **new** schema. The
328328documents contain a ``restaurants`` field, which holds an array of documents
329329that each represent the ``Restaurant`` class. These documents each have
330330a ``grades`` field that holds an array of documents that each represent
331- the ``Grade`` class.
331+ the ``Grade`` class. The following code models the document in this example:
332332
333333.. code-block:: json
334334
@@ -368,7 +368,7 @@ the ``Grade`` class.
368368You can nest ``SelectMany`` statements within ``SelectMany`` or ``Select``
369369statements. The following example nests a ``SelectMany`` statement within a
370370``Select`` statement to retrieve an array of ``Grade`` documents from all restaurants
371- in the preceding document.
371+ in each document in the collection .
372372
373373.. io-code-block::
374374 :copyable: true
@@ -382,6 +382,7 @@ in the preceding document.
382382 :visible: false
383383 :language: json
384384
385+ // output for first document in collection
385386 [
386387 { "date" : ISODate("2014-11-24T00:00:00Z"),
387388 "grade" : "Z",
@@ -396,6 +397,10 @@ in the preceding document.
396397 "score" : ...
397398 },
398399 ...
400+ ],
401+ // output for second document in collection
402+ [
403+ ...
399404 ]
400405
401406$group
You can’t perform that action at this time.
0 commit comments