Step: Object Identifier-Index: .foo

Object Identifier-Index: .foo

The simplest useful filter is .foo. It produces the value at the key "foo", or null if there's none present.

For example given input

{"make": "Nissan", "model": "Kicks"}

and filter .make it produces "Nissan"

Now you try to create a JQ expression that would product the result.

Input:
{
  "firstName": "Charles",
  "lastName": "Doe"
}
Expected:
"Charles"