Combine two objects with later keys overwriting earlier ones.
Section: Arrays and Objects
Merge objects
bash
bash
jq -n '{name:"alice",age:30} + {age:31,city:"SF"}'Explanation
The `+` operator merges objects shallowly.
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 Arrays and Objects