diff --git a/docs/30-simple-queries/2-match.mdx b/docs/30-simple-queries/2-match.mdx index 355c7a5..e86334a 100644 --- a/docs/30-simple-queries/2-match.mdx +++ b/docs/30-simple-queries/2-match.mdx @@ -20,7 +20,7 @@ The `` portion of the $match operator can be any valid MongoDB expre ## Matching book documents - + First, make sure you select the `books` collection in the Atlas UI. @@ -58,7 +58,7 @@ The `` portion of the $match operator can be any valid MongoDB expre Answer
- + ```js [ @@ -86,7 +86,7 @@ If we need to add more conditions using AND, we can do it with the `$and` operat If we want all the books with 100 pages with exactly `totalInventory` 2 we can use an `$and` operator. This takes and array of documents with all the conditions that should be true for the AND to succeed: - + ```js [ @@ -187,7 +187,7 @@ db.books.aggregate([{$match: {$and: [{pages: 100}, {year: 2015}]}}]).itcount() We can do an implicit AND just passing a document with all the conditions (instead of an array of documents): - + ```js [ @@ -211,7 +211,7 @@ db.books.aggregate([{$match: {pages: 100, totalInventory: 2}}]) Answer
- + ```js [ diff --git a/docs/30-simple-queries/3-project.mdx b/docs/30-simple-queries/3-project.mdx index c8c845d..5bb400c 100644 --- a/docs/30-simple-queries/3-project.mdx +++ b/docs/30-simple-queries/3-project.mdx @@ -62,7 +62,7 @@ A document from the `books` collection looks like: If we're interested just in the titles, we can use `$project` to select just the fields we're interested in. As an example, to get just the book's title and year we'll write: - + ```js [