News for hackers. Stuff that matters.
Re:Fx – Terminal JSON Viewer by gcr on Tuesday September 19, 2023 @10:27AM (#37570454)
What’s the original JSON? Happy to try and express this in jq
Re:Fx – Terminal JSON Viewer by maleldil on Tuesday September 19, 2023 @02:43PM (#37574316)
Looks like the GitHub API: https://docs.github.com/en/free-pro-team@latest/rest/commits...

I'm looking forward to your jq version. I love jq and use it all the time, but for anything of that complexity, I'd probably just use Python.

Re:Fx – Terminal JSON Viewer by wwader on Sunday September 24, 2023 @04:40AM (#37631216)
If the task was the produce an object with the top 10 commiters with username as key and value number of commits maybe something liket this:

    group_by(.commit.author.name) | map({key: first.commit.author.name, value: length}) | sort_by(.value) | reverse[:10] | from_entries