Bash shell extract object from json file<>
This question already has an answer here:
- Parsing JSON with Unix tools 36 answers
It's going to be flaky doing this using bash. There do seem to be json parsers written as shell scripts although I'm not sure how solid they are. I'd recommend something like jq which can run as a separate program and be used in a pipe. It's a standalone executable and written in C. There's no reason it can't be shipped along with your program.