I'm looking to change the value of a key in a json file
Example:
"House":"sample.house.city"
Need to change the word "sample" to something else.
I can do this with:
sed -i 's|sample.house.city|town-home.house.city|g' file.json
but there is no guarantee that "sample" is going to be the same every time.
I've tried:
sed -i 's|*.house.city|town-home.house.city|g' file.json
but it doesn't change.
Also tried:
sed -i 's|"*.house.city"|"town-home.house.city"|g' file.json
but that ends up like:
"sample"town-home.house.city"
Any recommendations on how to do this correctly?