Quantcast
Channel: Active questions tagged jq - Stack Overflow
Viewing all articles
Browse latest Browse all 657

JQ how to print newline and not newline character from json value

$
0
0

I have some logs that output information in JSON. This is for collection to elasticsearch.

Some testers and operations people want to be able to read logs on the servers.

Here is some example JSON:

{"@timestamp": "2015-09-22T10:54:35.449+02:00","@version": 1,"HOSTNAME": "server1.example","level": "WARN","level_value": 30000,"logger_name": "server1.example.adapter","message": "message""stack_trace": "ERROR LALALLA\nERROR INFO NANANAN\nSOME MORE ERROR INFO\nBABABABABABBA BABABABA ABABBABAA BABABABAB\n"}

And so on.

Is it possible to make Jq print newline instead of the \n character sequence as seen in the value of .stack_trace?


Viewing all articles
Browse latest Browse all 657

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>