Skip to content

Commit 2b2a9f3

Browse files
authored
Merge pull request #23 from Meg528/patch-15
Update 1-simple-match-array.mdx
2 parents bfba2e2 + 94006d7 commit 2b2a9f3

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

docs/40-using-arrays/1-simple-match-array.mdx

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,17 @@
1-
# 👐 Simple Array queries
1+
# 👐 Simple Array Queries
22

33
## Find data in arrays
44

5-
A JSON Array can contain scalar values or objects. In our data, `authors` have an array of the books they've authored (their ISBNs). Let's get one author:
5+
A JSON array can contain scalar values or objects. In our data, `authors` have an array of the books they've authored (their ISBNs). Let's get one author:
66

77

88
```js
99
db.authors.aggregate([{$limit: 1}])
1010
```
1111

12-
👐 Run this aggregation to get one author
12+
👐 Run this aggregation to get one author.
1313

14-
I got this one (can change depending on the data source you imported)
14+
I got this one. (It can change depending on the data source you imported.)
1515

1616
```js
1717
{
@@ -35,7 +35,7 @@ db.authors.aggregate([
3535
])
3636
```
3737

38-
👐 Get book's author name for ISBN `0395623650`:
38+
👐 Get the book's author name for ISBN `0395623650`:
3939

4040
<details>
4141
<summary>Answer</summary>
@@ -51,7 +51,7 @@ db.authors.aggregate([{$match: {books: "0395623650"}}])
5151

5252
## Size of an array
5353

54-
What if we want to know how many aliases an Author has? To do that we can use `$size`, adding the array field that we're interested in:
54+
What if we want to know how many aliases an author has? To do that, we can use `$size`, adding the array field that we're interested in:
5555

5656
```js
5757
db.authors.aggregate([
@@ -63,7 +63,7 @@ db.authors.aggregate([
6363
])
6464
```
6565

66-
👐 Who wrote the most books? (we can sort using `{ $sort: {"bookCount": -1}}`)
66+
👐 Who wrote the most books? (We can sort using `{ $sort: {"bookCount": -1}}`.)
6767

6868
<details>
6969
<summary>Answer</summary>

0 commit comments

Comments
 (0)