[jq] Output strings as plain text

Created on November 28, 2026

By default, jq formats its output as JSON, with double quotes around strings and brackets around arrays. You can use the -r option to write string results as plain text. This example outputs only the name properties as plain text.

echo '[{"name": "Taro", "age": 25},{"name": "Satoshi", "age": 30}]' | jq -r '.[].name'

The command produces the following output.

Taro
Satoshi
jq