Skip to content

Commit 9ceafa0

Browse files
committed
wrote a script to output the names and last scores of each players.
1 parent 0a96936 commit 9ceafa0

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

jq/script-07.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,3 +6,4 @@ set -euo pipefail
66
# TODO: Write a command to output just the names of each player along with the score from their last attempt.
77
# Your output should contain 6 lines, each with one word and one number on it.
88
# The first line should be "Ahmed 4" with no quotes.
9+
~/bin/jq -r '.[] | .name + " " + (.scores[-1] | tostring)' scores.json

0 commit comments

Comments
 (0)