Jq Command Basics Online Course
Jq Command Basics Online Course
This course introduces you to using the Jq command in Bash shell scripting to efficiently parse and work with JSON data from REST API responses. You’ll start with the basics of filters and options for handling JSON objects, then move on to working with arrays, constructing objects, and using the -n option. Finally, you’ll explore Jq functions for advanced operations. By the end, you’ll have the skills and confidence to integrate Jq into your shell scripts for seamless JSON parsing and automation in DevOps tasks.
Who should take this course?
This course is ideal for developers, data engineers, system administrators, and anyone who works with JSON data regularly. Beginners in command-line tools who want to learn efficient ways to parse, filter, and manipulate JSON will also benefit greatly.
What you will learn
- Learn Jq basics from scratch
- Learn how to parse (read and write) JSON data with the Jq command
- Look at the usage of the Jq command in Bash Shell Scripting
- See how to pretty-print JSON in the command line
- Understand the use of different types of filters on JSON data
- Learn to use Jq select function with iterator filter and map function
Course Outline
Introduction to the Course
- Prerequisites
- Basics to Work with Jq Command
- Introduction to Jq Command
- 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
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
Simple Usage of Jq Command in Shell Scripts
- Jq Command Usage to Read Username and Password from REST API | Shell Script
Working with JSON Arrays
- Basic Concepts to Work with Arrays
- JSON Array Slicing Using Jq Command
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
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
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)
Conditional Statements | Simple if| if else | if elif…else
Jq Command with Exit Status for Bash Shell Scripting
Operations on Strings
- Concatenation of Strings
- Encode and Decode a String
Arithmetic Operations on Numbers (int and float)
Creating Bash Array from JSON Array
- Creating Bash Array from JSON Array
Jq Command Usage with Kubectl
- Simple Usage of Jq with Kubernetes
No reviews yet. Be the first to review!