Json

From Hackepedia
Jump to navigationJump to search

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.