Last active
June 13, 2020 12:55
-
-
Save jcass8695/f589a48578a793078c203862aee10e94 to your computer and use it in GitHub Desktop.
Bash/jq one liner to grab the stats on every weapon in Red Dead Redemption 2 and format in nice pretty JSON
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#! env bash | |
curl "https://www.gtabase.com/media/com_jamegafilter/en_gb/8.json" \ | |
| jq "[.[] | { name: .name } * ([.attr[] | { key: (.title | if type == \"array\" then .[0] else . end), value: (.value | if type == \"array\" then .[0] else . end) }] | from_entries)]" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment