Step: Identity: .

Identity: .

The simplest filter is . — the identity filter. It takes the input and produces it unchanged, pretty-printed with 2-space indentation.

Why it matters: . is how you format (pretty-print) a blob of minified JSON, and it's the base you build every other path on — .foo, .[0], and pipes all start from ..

The left panel is the input; the right panel is the expected output. Type your filter in the jq Expression box and press Check (or Cmd/Ctrl+Enter).

Your turn: pretty-print the input with the identity filter.

Input:
{
  "firstName": "Charles",
  "lastName": "Doe"
}
Expected:
{
  "firstName": "Charles",
  "lastName": "Doe"
}
Step 1 of 27