skip to Main Content

having trouble converting csv to json using bash jq

I have one stream output stored in csv file, I need help converting csv to json: my csv looks like: cat output.csv "k","a1",1,"b1","c1","d1",1 "l","a2",2,"b2","c2","d2",2 "m","a3",3,"b3","c3","d3",3 "n","a4",4,"b4","c4","d4",4 "o","a5",5,"b5","c5","d5",5 Required output: note: I need key configuration to be added to json. {…

VIEW QUESTION

Json – Bash group csv data by values

I have a CSV that looks like this: created,id,value 2022-12-16 11:55,58,10 2022-12-16 11:55,59,2 2022-12-16 11:50,58,11 2022-12-16 11:50,59,3 2022-12-16 11:50,60,7 I want to parse it so I have the following result, setting ids as columns and grouping by date: created,58,59,60 2022-12-16…

VIEW QUESTION
Back To Top
Search