We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 6fc23ce commit ffe14f8Copy full SHA for ffe14f8
.DS_Store
6 KB
jq/script-05.sh
@@ -5,6 +5,6 @@ set -euo pipefail
5
# The input for this script is the scores.json file.
6
# TODO: Write a command to output the names of each player, as well as their city.
7
# Your output should contain 6 lines, each with two words on it.
8
- [{"name": "Ahmed", "city": "London", "scores": [1, 10, 4]}, {"name": "Basia", "city": "London", "scores": [22, 9, 6]}, {"name": "Mehmet", "city": "Birmingham", "scores": [3, 12, 17]}, {"name": "Leila", "city": "London", "scores": [1]}, {"name": "Piotr", "city": "Glasgow", "scores": [15, 2, 25, 11, 8]}, {"name": "Chandra", "city": "Birmingham", "scores": [12, 6]}]
+# [{"name": "Ahmed", "city": "London", "scores": [1, 10, 4]}, {"name": "Basia", "city": "London", "scores": [22, 9, 6]}, {"name": "Mehmet", "city": "Birmingham", "scores": [3, 12, 17]}, {"name": "Leila", "city": "London", "scores": [1]}, {"name": "Piotr", "city": "Glasgow", "scores": [15, 2, 25, 11, 8]}, {"name": "Chandra", "city": "Birmingham", "scores": [12, 6]}]
9
# jq -r '.[].name + " " + .[].city' scores.json wrong all combops
10
jq -r '.[] | .name + " " + .city' scores.json
0 commit comments