jq CLI Recipes/Turn JSON logs into TSV

Extract selected fields into tab-separated text.

Section: Logs and Reporting

Turn JSON logs into TSV

bash
bash
cat app.log | jq -r '[.timestamp, .level, .message] | @tsv'
Explanation

Great for quick grep-friendly tabular output.

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 Logs and Reporting
Extract log levels
Read a field from each JSON log line.
OpenIn sheetbashsame section
Filter error logs
Return only error-level JSON log lines.
OpenIn sheetbashsame section
Count logs by level
Aggregate log frequency by level.
OpenIn sheetbashsame section
Build Markdown table rows
Create Markdown-friendly rows from JSON data.
OpenIn sheetbashsame section
Convert env vars into JSON object
Build JSON from shell variables.
OpenIn sheetbashsame section
Pretty-print JSON API response
Format a JSON HTTP response from curl.
OpenIn sheetbash1 tag match