Load one JSON document into a jq variable.
Section: Arguments and Shell Integration
Read one JSON file into variable
bash
bash
jq --argfile cfg config.json '{config: $cfg, data: .}' data.jsonExplanation
Use when you need a single parsed JSON document as context.
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