Skip to content

Commit 7338cf9

Browse files
authored
Merge pull request #30 from Meg528/patch-22
Update adding-fields.mdx
2 parents a25b97a + 6a0423f commit 7338cf9

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

docs/80-modifying-results/adding-fields.mdx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
# 👐 Adding new fields to results
1+
# 👐 Adding New Fields to Results
22

33
## $addFields
44

5-
We want to estimate the reading time for a book. But we don't have that field stored in our data. We can use `$addFields` for this. If the field exists, it'll get updated, if not, it's added.
5+
We want to estimate the reading time for a book. But we don't have that field stored in our data. We can use `$addFields` for this. If the field exists, it'll get updated, and if it doesn't, it's added.
66

77
```js
88
db.books.aggregate([
@@ -15,7 +15,7 @@ db.books.aggregate([
1515
])
1616
```
1717

18-
👐 Add a new field `notes` that contains the text `PLACEHOLDER` for all documents.
18+
👐 Add a new field, `notes`, that contains the text `PLACEHOLDER` for all documents.
1919

2020
<details>
2121
<summary>Answer</summary>
@@ -36,4 +36,4 @@ db.books.aggregate([
3636
```
3737

3838
</div>
39-
</details>
39+
</details>

0 commit comments

Comments
 (0)