Skip to content

London | 26-SDC-Mar | Craig D'Silva | Sprint 2 | jq#393

Open
craig-dsilva wants to merge 1 commit intoCodeYourFuture:mainfrom
craig-dsilva:jq
Open

London | 26-SDC-Mar | Craig D'Silva | Sprint 2 | jq#393
craig-dsilva wants to merge 1 commit intoCodeYourFuture:mainfrom
craig-dsilva:jq

Conversation

@craig-dsilva
Copy link
Copy Markdown

Learners, PR Template

Self checklist

  • I have titled my PR with Region | Cohort | FirstName LastName | Sprint | Assignment Title
  • My changes meet the requirements of the task
  • I have tested my changes

Changelist

I have completed the jq exercises.

@craig-dsilva craig-dsilva added 🐂 Size Medium 1-4 hours 📅 Sprint 2 Assigned during Sprint 2 of this module Needs Review Trainee to add when requesting review. PRs without this label will not be reviewed. Module-Tools The name of the module. labels Mar 19, 2026
Copy link
Copy Markdown

@cjyuan cjyuan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Solution works. I just have a few questions.

Comment thread jq/script-01.sh
# TODO: Write a command to output the name of the person.
# Your output should be exactly the string "Selma", but should not contain any quote characters.

cat person.json | jq -r ".name" No newline at end of file
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why not specify the input filename directly as:

jq -r .name person.json

?

Comment thread jq/script-03.sh
# TODO: Write a command to output the name of the person, then a comma, then their profession.
# Your output should be exactly the string "Selma, Software Engineer", but should not contain any quote characters.

cat person.json | jq -j '[.name, .profession] | join (", ")' No newline at end of file
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why use -j option on this particular command?

@cjyuan cjyuan added Reviewed Volunteer to add when completing a review with trainee action still to take. and removed Needs Review Trainee to add when requesting review. PRs without this label will not be reviewed. labels May 9, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Module-Tools The name of the module. Reviewed Volunteer to add when completing a review with trainee action still to take. 🐂 Size Medium 1-4 hours 📅 Sprint 2 Assigned during Sprint 2 of this module

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants