Inspecting JSON at the Command-Line

This is a simple tool to pull specific values out of JSON, or to pull JSON from JSON, at the command-line:


It’s useful to pull configuration values from within a Bash script.

Example data:

{"a": [9, 6, {"b": [99, 88, 77, "text", 55]}]}

Example commands:

$ cat example.json | jp a.2.b.3

$ cat example.json | jp a.2 | jp b.3

$ cat example.json | jp a.2 | jp -p b.3

One thought on “Inspecting JSON at the Command-Line

Comments are closed.