With jq
command, I want to merge multiple json files.
But I have no idea how to achieve below expectation.
a.json
{
"key1": {
"key2": [
1,
2
]
},
"key3": "aaa"
}
b.json
{
"key1": {
"key2": [
3,
4,
5
]
},
"key4": "bbb"
expected result
{
"key1": {
"key2": [
1,
2,
3,
4,
5
]
},
"key3": "aaa",
"key4": "bbb"
}
New contributor
tokugawa is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.