Extract active users from a JSON array as TSV
Build a paste-ready command, then review its compatibility and effects before running it.
jq -r '.[] | select(.active == true) | [.name, .email] | @tsv' <file>Complete required fields to copy the generated command.
read-onlyno known side effects Compatibility
Linux + macOS + WindowsVerified for Linux, macOS, Windows using bash, zsh, powershell syntax.
Operational knowledgereview due 2027-01-19
Requirementsjqjq must be installed and available on PATH.
Version supportjq Current supported releasesVerified for linux, macos, windows using bash, zsh, powershell syntax; consult compatibility notes for platform-specific differences.
Expected signalsAda Lovelace ada@example.comRepresentative successful output; values vary with the selected target and system state.
Known errorsjq: command not foundjq is missing or is not available on PATH.
Verifyjq -r '.[] | select(.active == true) | [.name, .email] | @tsv' {{file}}The output matches the expected target and exits without an error.Rollback noteNot required: this command is read-only and does not change system state.
Command breakdown
01jqCommandRuns the jq stage of this one-liner.
02-rOptionEnables raw, recursive, or reverse mode for this command.
03'.[] | select(.active == true) | [.name, .email] | @tsv'ArgumentPasses '.[] | select(.active == true) | [.name, .email] | @tsv' to jq.
04<file>ParameterA value supplied in the Fill parameters section.
This advanced community-curated one-liner combines several stages. Review every option and placeholder before running it.
Example input
jq -r '.[] | select(.active == true) | [.name, .email] | @tsv' users.json
Example output
Ada Lovelace ada@example.com
Grace Hopper grace@example.com
Illustrative output — exact values vary by system and data.
Official sources