Skip to content

Commit d7b1d9c

Browse files
committed
Extract player names with their game attempt count from scores.json
1 parent 20a55d5 commit d7b1d9c

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

jq/script-08.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 number of times they've played the game.
77
# Your output should contain 6 lines, each with one word and one number on it.
88
# The first line should be "Ahmed 3" with no quotes.
9+
jq -r '.[] | "\(.name) \(.scores | length)"' scores.json

0 commit comments

Comments
 (0)