Skip to content

Commit 589d5fc

Browse files
committed
Extract name and profession from person.json as comma-separated values
1 parent 8cd76b6 commit 589d5fc

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

jq/script-03.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 person.json file.
66
# TODO: Write a command to output the name of the person, then a comma, then their profession.
77
# Your output should be exactly the string "Selma, Software Engineer", but should not contain any quote characters.
8+
jq -r '[.name, .profession] | join(", ")' person.json

0 commit comments

Comments
 (0)