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

How to prettify json with jq given a string with escaped double quotes

$
0
0

I would like to pretty print a json string I copied from an API call which contains escaped double quotes.

Similar to this:

"{\"name\":\"Hans\", \"Hobbies\":[\"Car\",\"Swimming\"]}"

However when I execute pbpaste | jq "." the result is not changed and is still in one line.

I guess the problem are the escaped double quotes, but I don't know how to tell jq to remove them if possible, or any other workaround.


Viewing all articles
Browse latest Browse all 657

Trending Articles



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