jq
Verified for current stable LTS
Jq Commands
Jq command syntax with verified terminal examples.
Commands
8 commands for Jq
jq HTTP
Jq Command: Add Remove Keys Jq
<cat path/to/file.json> | jq '. <+|-> {{"key1": "value1", "key2": "value2", ...}}' jq HTTP
Jq Command: Create New Json From Multiple Files
<cat path/to/multiple_json_file_*.json> | jq '{{newKey1: .key1, newKey2: .key2.nestedKey, ...}}' jq HTTP
Jq Command: Execute Expression Jq
jq '.' <path/to/file.json> jq HTTP
Jq Command: Execute Script Jq
<cat path/to/file.json> | jq -f <path/to/script.jq> jq HTTP
Jq Command: Pass Arguments Jq
<cat path/to/file.json> | jq <--arg "name1" "value1" --arg "name2" "value2" ...> '<. + $ARGS.named>' jq HTTP
Jq Command: Print All Array Object Values
<cat path/to/file.json> | jq '.[]' jq HTTP
Jq Command: Print Objects With Filter
<cat path/to/file.json> | jq '.[] | select((.key1=="value1") and .key2=="value2")' jq HTTP
Jq Command: Print Specific Array Items
<cat path/to/file.json> | jq '<.[index1], .[index2], ...>' Suggest a Jq Command
Submit missing workflows, corrections, or verified alternatives for this tool.
FAQ
Coverage: Focused examples for common Jq workflows.
Verified version: current stable LTS.
Verification: Test commands in a disposable workspace and submit notes for edge cases.