Install jid on Ubuntu 20.04

Install jid on Ubuntu 20.04

The jid is a command line tool which allows to drill down JSON data interactively using filters. This tool provides suggestion and auto-completion.

This tutorial demonstrates how to install jid on Ubuntu 20.04.

Install jid

Download latest version of jid from GitHub:

sudo wget -qO /usr/local/bin/jid.gz

Execute the following command to extract binary file from archive:

sudo gunzip /usr/local/bin/jid.gz

Set execute permission for file:

sudo chmod a+x /usr/local/bin/jid

Now jid command is available for all users as a system-wide command.

We can check jid version:

jid -version

Testing jid

Create test.json file:

echo '{"status":"success","data":[{"name":"John","age":25},{"name":"James","age":29}]}' > test.json

Run jid command and load JSON from a file:

jid < test.json

Now we can drill down JSON data incrementally by using filters. For example, we can retrieve a particular field of JSON object or an element of JSON array as follows:

Drill down JSON using jid on Ubuntu

Uninstall jid

If jid is no longer needed, remove related file:

sudo rm -rf /usr/local/bin/jid

Leave a Comment

Cancel reply

Your email address will not be published.