jq -c '.[]' data.json

Category: Data Science & Analysis

jq -c '.[]' data.json

Stream JSON objects one compact line at a time

The -c flag emits compact output with no extra whitespace, and .[] streams each array element onto its own line. The result is JSON Lines, one object per line, ideal for piping into grep or other line-oriented tools. Large arrays can be processed incrementally this way. Use jq -c without .[] to compact a whole document instead.
Looking for more? Search all 7,657 commands — works offline, in English or Spanish, and fixes typos.