Created
February 22, 2021 13:36
-
-
Save NickAger/4029b28bc748b9a5957f5bba9eaff568 to your computer and use it in GitHub Desktop.
jq json to csv with transpose
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
https://jqplay.org | |
Transpose json into csv columns | |
see: https://stackoverflow.com/questions/48224065/jq-convert-json-file-with-arrays-to-csv-transposed | |
[.[]] | transpose[] | @csv | |
input: | |
{ | |
"0": [1,2,3,4,5], | |
"1": [10,20,30,40, 50] | |
} | |
output: | |
"1,10" | |
"2,20" | |
"3,30" | |
"4,40" | |
"5,50" | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment