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 217ad76 commit 9789692Copy full SHA for 9789692
jq/script-10.sh
@@ -4,6 +4,6 @@ set -euo pipefail
4
5
# The input for this script is the scores.json file.
6
# TODO: Write a command to output the total of adding together all players' first scores.
7
-jq -r '[.[].scores[0]] | add' scores.json
+jq 'map(.scores[0]) | add' scores.json
8
9
# Your output should be exactly the number 54.
jq/script-11.sh
# TODO: Write a command to output the total of adding together all scores from all games from all players.
-jq -r '[.[].scores[]] | add' scores.json
+jq 'map(.scores[]) | add' scores.json
# Your output should be exactly the number 164.
0 commit comments