Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file added .DS_Store
Binary file not shown.
30 changes: 0 additions & 30 deletions javascript/100_aggregation_pipeline_match.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -86,36 +86,6 @@
"});"
]
},
{
"cell_type": "markdown",
"id": "9f6caab3",
"metadata": {},
"source": [
"### Exercise: get all books from 2010 and 2012"
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This one is not actually a duplicate, as we're introducing a shorthand $and operator. I wouldn't delete it

]
},
{
"cell_type": "code",
"execution_count": null,
"id": "polar-pride",
"metadata": {},
"outputs": [],
"source": [
"const booksFrom2010and2012 = [\n",
" { $match: { \n",
" year: 2010,\n",
" // add code here!\n",
" } \n",
" }\n",
" ];\n",
" \n",
" const cursor = await books.aggregate( booksFrom2010and2012 );\n",
" \n",
" await cursor.forEach((b) => {\n",
" console.log(b);\n",
" });"
]
},
{
"cell_type": "markdown",
"id": "a6717c30",
Expand Down
4 changes: 2 additions & 2 deletions javascript/101_aggregation_pipeline_arrays.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@
" {\n",
" $project: {\n",
" title: 1,\n",
" genre: 1,\n",
" genres: 1,\n",
" },\n",
" },\n",
"];\n",
Expand Down Expand Up @@ -126,7 +126,7 @@
" {\n",
" $project: {\n",
" title: 1,\n",
" genre: 1,\n",
" genres: 1,\n",
" },\n",
" },\n",
"];\n",
Expand Down
2 changes: 1 addition & 1 deletion javascript/103_aggregation_pipeline_lookup.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@
" {\n",
" $project: {\n",
" _id: 0,\n",
" title: 1,\n",
" name: 1,\n",
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🤦 yes, should be name

" books: 1,\n",
" booksWritten: 1,\n",
" },\n",
Expand Down