I read a json from a file, manipulated one of the fields such as below and got the output on terminal
cat list.json | jq ".module.home.[].names | map(.long="$long")"
However, the original file i.e. list.json
is still having old values. How do I update only this object back in the original file.
Solutions such as here replaces the whole content with the output of command. However, what I want to is only update a particular object such as ".module.home.[].names
in it, and leave the rest as it is.