Suppress null outputs entirely.
Section: Filters and Conditions
Drop null values from stream
bash
bash
echo '[1,null,2,null]' | jq '.[] | select(. != null)'Explanation
Use `empty` or `select()` to suppress unwanted outputs.
Learn the surrounding workflow
Compare similar commands or jump into common fixes when this command is part of a bigger troubleshooting path.
Related commands
Same sheet · prioritizing Filters and Conditions