Get the latest tech news
Parsing JSON in Forty Lines of Awk
A single-function JSON parser for the POSIX shell.
There are well-known tools such as jq that let you correctly parse JSON documents in the shell, but all require an additional dependency. awk is the closest thing to a real programming language that’s available in the POSIX shell, so I thought I’d try to write a basic JSON parser in it. The interface is simple, a single function that accepts a JSON document and a dotted path to a key or array index, and returns the corresponding value.
Or read this on Hacker News