Skip to content

Commit 3d11e78

Browse files
committed
Update jq to use join() so it works for any number of adress lines
1 parent e9cc6d0 commit 3d11e78

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

jq/script-02.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,4 +6,4 @@ set -euo pipefail
66
# TODO: Write a command to output the address of the person, all on one line, with a comma between each line.
77
# Your output should be exactly the string "35 Fashion Street, London, E1 6PX", but should not contain any quote characters.
88

9-
jq -r '.address | "\(.[0]), \(.[1]), \(.[2])"' person.json
9+
jq -r '.address | join(", ")' person.json

0 commit comments

Comments
 (0)