jq CLI Recipes/Build Markdown table rows

Create Markdown-friendly rows from JSON data.

Section: Logs and Reporting

Build Markdown table rows

bash
bash
echo '[{"name":"alice","score":90},{"name":"bob","score":85}]' | jq -r '.[] | "| (.name) | (.score) |"'
Explanation

Handy for docs, PR comments, and status reports.

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
Turn JSON logs into TSV
Extract selected fields into tab-separated text.
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