Delete Line Feed Code by DOS and Bash

Input JSON

text.txt :

{
  "values": [
    [
      "a1",
      "b1",
      "c1"
    ],
    [
      "a2",
      "b2",
      "c2"
    ],
    [
      "a3",
      "b3",
      "c3"
    ],
    [
      "a4",
      "b4",
      "c4"
    ],
    [
      "a5",
      "b5",
      "c5"
    ]
  ]
}

Windows DOS

type text.txt | jq -c "."

Linux Bash

$ cat text.txt | jq -c '.'

Output JSON

{"values":[["a1","b1","c1"],["a2","b2","c2"],["a3","b3","c3"],["a4","b4","c4"],["a5","b5","c5"]]}

 Share!