NW | 2026-mar-sdc | Zabihollah Namazi | Sprint 2 | jq #381
NW | 2026-mar-sdc | Zabihollah Namazi | Sprint 2 | jq #381ZabihollahNamazi wants to merge 2 commits into
Conversation
There was a problem hiding this comment.
Your solution works. You may want to check out these alternatives: https://github.com/CodeYourFuture/Module-Tools/tree/solutions/jq (especially the approach that uses string interpolation.)
| # The input for this script is the person.json file. | ||
| # 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. | ||
| jq -r '[.name, .profession] | join(", ")' person.json # join works on arrays thats why we need to to put values of name and profession in a array to be able to use join |
There was a problem hiding this comment.
Inline comments should be avoided in shell scripts unless they are very short, since separate-line comments are generally clearer and safer.
To further improve readability, consider also using empty line as separator to separate the spec and your solution.
Can you improve the readability of your scripts?
There was a problem hiding this comment.
i have done what you suggested
thank you
|
All good. |
|
Closing PR because the SDC run has finished. Feel free to re-open if you're still working on it. |
Self checklist
Changelist
all are done and please review them , thanks