Skip to content

Commit 52899b5

Browse files
committed
Use jq to iterate and over object and print name and city
1 parent 060d1e9 commit 52899b5

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

jq/script-05.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,3 +5,4 @@ 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) \(.city)"' scores.json

0 commit comments

Comments
 (0)