File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff 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.
7979jsonquery (data, [
8080 " pipe" ,
You can’t perform that action at this time.
0 commit comments