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

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

About Author

Lucas Jellema, active in IT (and with Oracle) since 1994. Oracle ACE Director and Oracle Developer Champion. Solution architect and developer on diverse areas including SQL, JavaScript, Kubernetes & Docker, Machine Learning, Java, SOA and microservices, events in various shapes and forms and many other things. Author of the Oracle Press book Oracle SOA Suite 12c Handbook. Frequent presenter on user groups and community events and conferences such as JavaOne, Oracle Code, CodeOne, NLJUG JFall and Oracle OpenWorld.

2 Comments

  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.