Created
November 11, 2020 00:41
-
-
Save xvzftube/781d929a8a7cd1ee5d3d69e9ac77c1c7 to your computer and use it in GitHub Desktop.
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
#!/bin/bash | |
jq '. as $in | |
| reduce (.[0] | keys_unsorted[]) as $k ( {}; | |
.[$k] = ($in|map(.[$k] | (tonumber? // .))))' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment