sed for JSON
Every wish you could deal with JSON from the command-line as easily as with any other type of data? Well you can with
jq which essentially combines the functionality of all your favorite shell parsing tools into one monolithic JSON tool. In fact, it is so exhaustive in what it can do that it probably pays for it a little in execution time even though it is written in compatible C code.
Given the following
You can integrate it like so:
I like Apple pie.
Or you can even do match with numbers:
Can I have 2 pis? Sure, 6.283185307178.
Note that you need the single quotes around the queries that contain brackets and other characters that having special meaning to the shell otherwise.