Skip to content

Commit 5bf399e

Browse files
committed
made changes
1 parent 49c8fa3 commit 5bf399e

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

jq/script-05.sh

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,4 +5,6 @@ set -euo pipefail
55
# The input for this script is the scores.json file.
66
# TODO: Write a command to output the names of each player, as well as their city.
77
# Your output should contain 6 lines, each with two words on it.
8-
jq -r '.[]| {"name":.name, "city":.city} | join(" ")' scores.json
8+
# jq -r '.[]| {"name":.name, "city":.city} | join(" ")' scores.json
9+
10+
jq -r '.[] | .name + " " + .city' scores.json

jq/script-11.sh

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,4 +5,6 @@ set -euo pipefail
55
# The input for this script is the scores.json file.
66
# TODO: Write a command to output the total of adding together all scores from all games from all players.
77
# Your output should be exactly the number 164.
8-
jq '[.[].scores] | add | add' scores.json
8+
# jq '[.[].scores] | add | add' scores.json
9+
10+
jq '[.[].scores] | flatten | add' scores.json

0 commit comments

Comments
 (0)