Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CYF London | Rihanna Poursoltani | Module-Tools | Sprint 2 | JQ #37

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

RihannaP
Copy link

@RihannaP RihannaP commented Mar 8, 2025

Self checklist

  • I have committed my files one by one, on purpose, and for a reason
  • I have titled my PR with COHORT_NAME | FIRST_NAME LAST_NAME | REPO_NAME | WEEK
  • I have tested my changes
  • My changes follow the style guide
  • My changes meet the requirements of this task

@RihannaP RihannaP added 📅 Sprint 2 Assigned during Sprint 2 of this module Needs Review Participant to add when requesting review labels Mar 8, 2025
Copy link
Member

@illicitonion illicitonion left a comment

Choose a reason for hiding this comment

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

All looks great, good job!

@@ -6,3 +6,4 @@ set -euo pipefail
# TODO: Write a command to output just the names of each player along with the score from their first attempt.
# Your output should contain 6 lines, each with one word and one number on it.
# The first line should be "Ahmed 1" with no quotes.
jq -r '.[] | .name +" " + (.scores[0]| tostring)' scores.json
Copy link
Member

Choose a reason for hiding this comment

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

This works, and there's nothing wrong with it, but FYI you can also do string interpolation in jq, so your RHS of the pipe here could read: "\(.name) \(.scores[0])", and this could apply to several of your answers - I'm not saying either is better, but it's good to know :)

@illicitonion illicitonion added Complete Volunteer to add when work is complete and review comments have been addressed and removed Needs Review Participant to add when requesting review labels Mar 18, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Complete Volunteer to add when work is complete and review comments have been addressed 📅 Sprint 2 Assigned during Sprint 2 of this module
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants