Json: Difference between revisions
From Hackepedia
Jump to navigationJump to search
Created page with "I was getting json output that had no newlines, so was difficult to parse/filter. I ended up doing the following: cat json.output | sed -e 's/[{}]/'\\n'/g' | awk -F, '{print $..." |
(No difference)
|
Latest revision as of 05:57, 4 February 2011
I was getting json output that had no newlines, so was difficult to parse/filter. I ended up doing the following:
cat json.output | sed -e 's/[{}]/'\\n'/g' | awk -F, '{print $2}'
which removed the {}'s and replaced them with newlines. This made it easier to grep/awk.