New to jq. I am using it on windows command line. I need to split an array from the input JSON into rows and further split the element of the array into columns based on the tab delimiter (\t)
Example:
Input:
{"ProcessId": "5452","TotalRows": 226171,"Rows": ["001-CARDIO-GRAN\t1052","01_MO_FIN\t1148","02_MO_S_PACK\t1148" ]}
I need:
GRAN,105201_MO_FIN,114802_MO_S_PACK,1148
I tried this:
jq-win32 "last(.[])" output.json
And got
GRAN\t1052","01_MO_FIN\t1148","02_MO_S_PACK\t1148",
How do I further pipe this to split to accomplish what I need.