Load a JSON file into jq as an array of documents.
Section: Arguments and Shell Integration
Read another JSON file into variable
bash
bash
jq --slurpfile cfg config.json '.items[] | {name, config: $cfg[0]}' data.jsonExplanation
Useful for joins between documents or config-driven transforms.
Learn the surrounding workflow
Compare similar commands or jump into common fixes when this command is part of a bigger troubleshooting path.
Related commands
Same sheet · prioritizing Arguments and Shell Integration