Skip to content

Commit 8677a08

Browse files
committed
docs: some minor improvements in the README.md examples
1 parent bbfd316 commit 8677a08

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -61,20 +61,20 @@ const data = {
6161

6262
// Get the array containing the friends from the object, filter the friends that live in New York,
6363
// sort them by age, and pick just the name and age out of the objects.
64-
const names = jsonquery(data, `
64+
const output = jsonquery(data, `
6565
.friends
6666
| filter(.city == "New York")
6767
| sort(.age)
6868
| pick(.name, .age)
6969
`)
70-
// names = [
70+
// output = [
7171
// { "name": "Chris", "age": 23 },
7272
// { "name": "Sarah", "age": 31 },
7373
// { "name": "Joe", "age": 32 }
7474
// ]
7575

76-
// The same query can be written in JSON format.
77-
// The functions `parse` and `stringify` can be used
76+
// The same query can be written in JSON format instead of the text format.
77+
// Note that the functions `parse` and `stringify` can be used
7878
// to convert from text format to JSON format and vice versa.
7979
jsonquery(data, [
8080
"pipe",

0 commit comments

Comments
 (0)