0

I have a file output called file.json. I need to convert this file to a .csv file for better viewing since this is the output of AQL.

{
“results” : [{
   “file” : ”abc-trip-typ”
   “path” : “pit/pop/tracker”
   “type” :  “file”
   “created” : “2018–05-05:09:00”
   “properties” : [ {
        “tracker” :  “file.name”,
        “value” : “PRN_TY.0.0”
 },  {
   “tracker” :  “file.number”
   “value” : “9”
 }  ], 
“stats” : [  {
    “downloaded” : “2018-05-05:10:00”,
    “downloads” : 10
 }  ]
}

There are multiple such fields with same parameters which I need to convert to a CSV format i.e in a .csv file. Would appreciate any sorts of leads for the same.

newtocoding
  • 77
  • 1
  • 11
  • 3
    Possible duplicate of [How to convert arbirtrary simple JSON to CSV using jq?](https://stackoverflow.com/questions/32960857/how-to-convert-arbirtrary-simple-json-to-csv-using-jq) – Inian May 31 '18 at 09:56
  • 3
    Please follow the mcve guidelines https://stackoverflow.com/help/mcve. I.p., what is the expected CSV? – peak May 31 '18 at 12:48

0 Answers0