You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Console.WriteLine(book.ToJson()); // Shows the entire BSON document as JSON to show that some fields are null because they are not returned due to the projection
Console.WriteLine(book.ToJson()); // Shows the entire BSON document as JSON to show that some fields are null because they are not returned due to the projection
@@ -77,67 +77,114 @@ SELECT * FROM books ORDER BY timestamp DESC LIMIT 5;
77
77
<details>
78
78
<summary>Answer</summary>
79
79
<div>
80
-
There are 2 ways to solve this-
80
+
There are 2 ways to solve this-
81
81
- $project
82
82
- $addFields
83
83
84
84
:::info
85
85
Learn [when to use $addFields over $project](https://www.practical-mongodb-aggregations.com/guides/project.html?highlight=%24project#when-to-use-project)
0 commit comments