-3

jq always produces output with newlines/returns between each field:

jq ... foo.json
{
  "Name": "stedolan",
  "RecordTimestamp": "2021-02-25T05:00:06.740+0000"
}

How can I make the output one line per record so that it looks like:

{"Name":"stedolan","RecordTimestamp":"2021-02-25T05:00:06.740+0000"}
eric
  • 755
  • 6
  • 11

1 Answers1

0

jq has an option for this: --compact-output

jq --compact-output ... foo.json
{"Name":"stedolan","RecordTimestamp":"2021-02-25T05:00:06.740+0000"}

Full manual https://stedolan.github.io/jq/manual/v1.6/

eric
  • 755
  • 6
  • 11