Home
| Colors: |

Remove Double Quotes From Strings In jq Output

September 2023

Use the -r flag to remove double quotes from output strings:

echo '["alfa"]' | jq -r '.[0]'
Output:
alfa

vs. without the -r:

echo '["bravo"]' | jq '.[0]'
Output:
"bravo"
end of line