Be a part of the learning community to filter JSON data with ease. The Jq command is built around filters that are used to find and print only the required data from a JSON file.
About This Video
Highly practical and comes bundled with all the resource files including PPT files
End-to-end course on Jq command with the help of live examples for an in-depth understanding
Beginner's level guide to explain Jq command using Bash Shell …
Jq Command Tutorials for Bash Shell Scripting
Video description
Be a part of the learning community to filter JSON data with ease. The Jq command is built around filters that are used to find and print only the required data from a JSON file.
About This Video
Highly practical and comes bundled with all the resource files including PPT files
End-to-end course on Jq command with the help of live examples for an in-depth understanding
Beginner's level guide to explain Jq command using Bash Shell Scripts with detailed explanation
In Detail
Nowadays, DevOps automation is more into REST API usage, and REST API response is JSON. So, to implement bash shell scripts using REST APIs, you must know how to parse the response of REST API (that is, parse JSON data).
Jq is a program developed to filter JSON data. You can consider Jq like sed, awk, or grep program but designed specifically for filtering JSON data. Jq supports filters, conditions, operators, and other language features. While the creation and understanding of JSON data are effortless due to its human-readable format, JSON data parsing is still a very complicated task to achieve if done manually. Instead, you can use programs like Jq to parse JSON data in minutes.
In this course, you will see the usage of the Jq command in Bash Shell Scripts, followed by filters and options to work with JSON objects. After that, you will look at the simple usage of the Jq command in Shell Scripts and start working with JSON arrays using the index concept. Next, you will be constructing objects and arrays with and without inputs and the usage of the -n option in Jq Command. Finally, you will study the Jq functions.
By the end of this course, you will have learned and gained the requisite confidence to work with the Jq Command using Bash Shell scripting in detail.
Audience
This course is ideal for Bash Shell Scripting developers wanting to use Jq Command in scripts and programmers who work with JSON. IT professionals who work with JSON or anyone who works with JSON will also benefit from the course.
As a prerequisite, you should have a Linux/Mac system to practice, basic knowledge of the command line, along with beginner-level knowledge of usage of pipelines and redirections.
Basic knowledge of JSON data and working knowledge of any editor like vi/Vim/VS Code is recommended as well.
Install Jq Command, Verify the Version, and Get Help from Command Line
Public REST APIs to Practice with Jq Command
Basic Understanding of Jq Input and Outputs
Chapter 2 : Jq Filters and Options
Identity Filter
Different Ways to Pass JSON Data as an Input to Jq Command
Field Filter
How to Get Raw String for a Given Key or Property
Field Filter, Comma, and Raw String Combination
Chapter 3 : Simple Usage of Jq Command in Shell Scripts
Jq Command Usage to Read Username and Password from REST API | Shell Script
Chapter 4 : Working with JSON Arrays
Basic Concepts to Work with Arrays
JSON Array Slicing Using Jq Command
Chapter 5 : Constructing Object| Array| Null| Number| String| Boolean with and Without Inputs
Constructing Objects and Arrays with and Without Inputs
Constructing Null, Number, Strings and Boolean with and Without Inputs
Indentation with –tab and Compact Output with -c Option
Chapter 6 : Jq Functions – Keys | Length | Min | Max | Unique | Del and Pipes
Introduction to Functions and Pipes (to Combine Filters and Functions)
join and range Functions
has Function
map Function
select Function
Chapter 7 : Working with OS (Linux / Unix / Mac) Variables Using Jq Command
env Object | Usage of Export in Linux for env Object | Simple Shell Script
–arg Option to Work with OS Environment and Custom Variables
Functions: tonumber, tostring, ascii_upcase, and ascii_downcase
How to Use Variables with Filters and Others (Function, Conditional, and more)
Chapter 8 : Conditional Statements | Simple if| if else | if elif…else
Conditional Statements
Chapter 9 : Jq Command with Exit Status for Bash Shell Scripting
Jq Command Exit Status
Chapter 10 : Operations on Strings
Concatenation of Strings
Encode and Decode a String
Chapter 11 : Arithmetic Operations on Numbers (int and float)
Arithmetic Operators
Chapter 12 : Creating Bash Array from JSON Array
Creating Bash Array from JSON Array
Chapter 13 : Jq Command Usage with Kubectl
Simple Usage of Jq with Kubernetes
Start your Free Trial Self paced Go to the Course We have partnered with providers to bring you collection of courses, When you buy through links on our site, we may earn an affiliate commission from provider.
This site uses cookies. By continuing to use this website, you agree to their use.I Accept