SlaveCode LogoSlaveCode.
Academy
RoadmapProblemsSystem Design
‌
‌
‌
‌
‌
‌
‌
‌
‌
‌
‌
‌
‌
‌
‌
‌
‌
‌
SlaveCode LogoSlaveCode.

Standardize your coding journey. From basic academy courses and guided roadmaps to advanced system design, company interview prep, and real-time coding arenas. The all-in-one platform to master algorithms and prove your engineering excellence.

Officially Featured by Judge0

Learn & Practice

  • Academy
  • Problems
  • Roadmap
  • System Design
  • Companies

Compete & Tools

  • Arena
  • Contests
  • Compilers

Legal & Support

  • Report an Issue
  • Privacy Policy
  • Terms of Service
  • Contact Us

© 2026 SlaveCode. All rights reserved.

jq

jq

jq is a succinct programming language for querying and manipulating JSON data

Master jq with
Interactive Learning

Elevate your jq skills through 77 curated exercises across 11 core concepts. Master problem-solving with a structured learning path designed for modern developers.

jq

About jq

jq is a tool for parsing and transforming JSON data. jq is like sed for JSON data -- you can use it to slice and filter and map and transform structured data with the same ease that sed, awk, grep and friends let you play with text.

jq is a dynamically-typed functional programming language. All values are immutable.

jq programs are composed of pipelines of "filters": each filter takes a single item as input, acts on it, and outputs zero or more transformed elements. A "filter" can also be called an "expression".

The output(s) of an expression can be passed to another using the | operator. expressionA | expressionB applies expressionA to some input, then expressionB executes repeatedly for each of the outputs of expressionA.

The input to an expression can be referred to explicitly as .. An expression that adds 1 to its input reads like so: . + 1 (or 1 + .).

jq (the program) versus jq (the language)

jq is a program you can install as a package on a variety of operating systems, or build it from source (it's coded in C). It has several useful command-line options, and is quite fast.

The jq program also implements a language to enable arbitrarily complex manipulations of the input data.

This Exercism track will focus on the language. You will see usage of the jq program in the tests.

Versions

This Exercism track will focus on the original implementation of jq, whose home is https://jqlang.github.io/jq/. Other implementations, such as gojq, may have different syntax to what is documented here.

JSON

From json.org:

JSON (JavaScript Object Notation) is a lightweight data-interchange format. It is easy for humans to read and write. It is easy for machines to parse and generate. It is based on a subset of the JavaScript Programming Language Standard ECMA-262 3rd Edition - December 1999. JSON is a text format that is completely language independent but uses conventions that are familiar to programmers of the C-family of languages, including C, C++, C#, Java, JavaScript, Perl, Python, and many others. These properties make JSON an ideal data-interchange language.

This track is about jq not JSON. We will assume you are familiar with JSON syntax and data types.

Further reading

  • jq home
  • jq wiki
  • Stack Overflow jq info page

Key Features of jq

Widely used

jq has become a de-facto leader for transforming JSON data.

Small and fast

jq is available as a single binary with no dependencies, it's simple to install.

Generating JSON

Generate valid JSON using command-line options to avoid worrying about quoting edge cases.

Reporting

Reporting from REST APIs: piping the output of curl into jq is a powerful addition to your toolbox.

CI tooling

You may already be using jq in your CI workflows: get more comfortable with jq to amplify its power.

A functional language

jq is a functional programming language: jq code is very concise and maintainable.

Track icon

Widely used

jq has become a de-facto leader for transforming JSON data.

Small and fast

jq is available as a single binary with no dependencies, it's simple to install.

Generating JSON

Generate valid JSON using command-line options to avoid worrying about quoting edge cases.

Reporting

Reporting from REST APIs: piping the output of curl into jq is a powerful addition to your toolbox.

CI tooling

You may already be using jq in your CI workflows: get more comfortable with jq to amplify its power.

A functional language

jq is a functional programming language: jq code is very concise and maintainable.

A taste of jq concepts you'll cover

Ba

Basics

Nu

Numbers

St

Strings

Ar

Arrays

Ob

Objects

Re

Regular Expressions

Va

Variables

Co

Compare

Co

Conditionals

Fu

Functions

Re

Reduce

Re

Recursion

Dive into jq practice challenges

Hello World
Hello World
Level 1

SlaveCode's classic introductory exercise. Just say "Hello, World!".

Two-Fer
Two-Fer
Level 1

Create a sentence of the form "One for X, one for me.".

Acronym
Acronym
Level 2

Convert a long phrase to its acronym.

Bob
Bob
Level 2

Bob is a lackadaisical teenager. In conversation, his responses are very limited.

Collatz Conjecture
Collatz Conjecture
Level 2

Calculate the number of steps to reach 1 using the Collatz conjecture.

Darts
Darts
Level 2

Calculate the points scored in a single toss of a Darts game.