I'm trying to change multiple json values with this line
jq '.two="newval", .three="newval"' my.json
with this is the input
{
"one": {
"val": 1
},
"two": "val",
"three": "val",
"four": "val"
}
but the output is 2 jsons:
{
"one": {
"val": 1
},
"two": "newval",
"three": "val",
"four": "val"
}
{
"one": {
"val": 1
},
"two": "val",
"three": "newval",
"four": "val"
}
How can I change multiple values and output in one item?