Skip to content

Commit 8c0f293

Browse files
authored
Merge pull request #32 from Meg528/patch-24
Update saving-to-collection.mdx
2 parents 0d8dbc8 + 371c95e commit 8c0f293

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

docs/90-exporting-data/saving-to-collection.mdx

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,18 @@
1-
# 🦸 Saving to a collection
1+
# 🦸 Saving to a Collection
22

3-
You can export the result of an aggregation pipeline to a different DB / Collection. To do that just add a last aggregation stage to your pipeline:
3+
You can export the result of an aggregation pipeline to a different DB/collection. To do that, just add a last aggregation stage to your pipeline:
44

55
```js
66
{ $out: { db: "<output-db>", coll: "<output-collection>" } }
77
```
88

9-
You can omit the `db` attribute, in which case the new collection is created in the current DB.
9+
You can omit the `db` attribute, and the new collection will be created in the current DB.
1010

1111
```js
1212
{ $out: "<output-collection>" }
1313
```
1414

15-
👐 Create a copy of the books with exactly 100 pages and output as a new collection named `OneHundredPagesBooks.
15+
👐 Create a copy of the books with exactly 100 pages and output as a new collection named `OneHundredPagesBooks`.
1616

1717
<details>
1818
<summary>Answer</summary>
@@ -34,4 +34,4 @@ After running this, we should see a new collection with:
3434
show collections
3535
```
3636
</div>
37-
</details>
37+
</details>

0 commit comments

Comments
 (0)