Appologies if I\'ve overlooked something very obvious; I\'ve just found jq and am trying to use it to update one JSON value without affecting the surrounding da
jq
Update a value (sets .foo.bar to "new value"):
jq '.foo.bar = "new value"' file.json
Update a value using a variable (sets .foo.bar to "hello"):
variable="hello"; jq --arg variable "$variable" '.foo.bar = $variable' file.json