jq – Linux command line tool for interpreting and manipulating JSON documents

Lucas Jellema 2

I am not the first to discover jq, or even to write about it. However, jq was such a valuable tool for me that I felt obliged to share it with you. And turn it into a Katacoda scenario (Katacoda is on of my other favorite finds).

jq is a Linux command line utility that is easily used to extract data from JSON documents. The source of a JSON document can be a response from a CLI command or the result of a REST API call, files retrieved from remote locations or read from local storage. jq allows us to easily retrieve specific values from the JSON sources, store them in Shell variables and use them in scripts.

Play with jq in this Katacoda scenario: https://katacoda.com/lucasjellema/scenarios/jq-intro – that is also embedded at the end of this article.

Resources

2 thoughts on “jq – Linux command line tool for interpreting and manipulating JSON documents

  1. Thank you for the nice tutorial Lucas!

    FYI, this works nicely in a terminal window on MacOS as well: “brew install jq”

    (on the other hand, use Chrome to follow the tutorial as Safari is not too happy with it) /Demed

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Next Post

HTTP benchmarking using wrk. Parsing output to CSV or JSON using Python

Facebook 0 Twitter Linkedin wrk¬†is a modern HTTP benchmarking tool. Using a simple CLI interface you can put simple load on HTTP services and determine latency, response times and the number of successfully processed requests. It has a LuaJIT scripting interface which provides extensibility. A distinguishing feature of wrk compared […]