use jq to update json file 1

use jq to update json file

echo "$( jq '.address = "abcde"' test.json )" > test.json

Here is what the above code is Doing:
1. We’re using the jq command to parse the JSON file.
2. We’re using the .address = “abcde” filter to set the value of the address key to abcde.
3. We’re using the > operator to overwrite the original file with the new value.

Similar Posts