Skip to content

Commit 6d4c117

Browse files
committed
feedback
1 parent d5bc23a commit 6d4c117

File tree

1 file changed

+14
-8
lines changed

1 file changed

+14
-8
lines changed

source/fundamentals/linq.txt

Lines changed: 14 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -326,8 +326,8 @@ Nested Statements
326326
You can chain or nest ``Select`` and ``SelectMany`` statements to unwind nested
327327
arrays. Consider a collection that contains documents with a **new** schema. These
328328
documents contain a ``restaurants`` field, which holds an array of documents
329-
that each represent the ``Restaurant`` class. The documents within the array each have
330-
a ``grades`` field that holds an array of documents that each represent
329+
represented by the ``Restaurant`` class. The documents within the array each have
330+
a ``grades`` field that holds an array of documents represented by
331331
the ``Grade`` class. The following code is an example of a single document in
332332
this collection:
333333

@@ -350,16 +350,21 @@ this collection:
350350
"date" : ISODate("2013-01-17T00:00:00Z"),
351351
"grade" : "A",
352352
"score" : 13.0
353-
},
354-
...
353+
}
355354
]
356355
...
357356
},
358357
{
359358
"_id": { ... } ,
360359
"address": { ... },
361360
"name": "Harriet's Kitchen",
362-
"grades": [ ... ],
361+
"grades": [
362+
{
363+
"date" : ISODate("2014-04-19T00:00:00Z"),
364+
"grade" : "B",
365+
"score" : 12.0
366+
}
367+
],
363368
...
364369
},
365370
...
@@ -393,9 +398,10 @@ Each array holds all grade objects from all restaurants in each document.
393398
"grade" : "A",
394399
"score" : 13.0
395400
},
396-
{ "date" : ISODate("..."),
397-
"grade" : ...,
398-
"score" : ...
401+
{
402+
"date" : ISODate("2014-04-19T00:00:00Z"),
403+
"grade" : "B",
404+
"score" : 12.0
399405
},
400406
...
401407
],

0 commit comments

Comments
 (0)