Step: Optional access: .foo?
Optional access: .foo?
Appending ? suppresses errors from an access that doesn't apply, producing nothing instead of failing. On a missing object key you simply get null; ? matters most when the value might not be an object at all.
Why it matters: it's the jq equivalent of optional chaining (?.) — essential when iterating over heterogeneous records.
Your turn: safely read a middleName that isn't there (expected output is null).
Input:
Expected:
Step 5 of 27