I have a json file and I'm looking to lowercase PART of a value - I can jq the value and lower case the string but how do I ensure this new lowercase value gets added back into the whole file?
jq '.[].Id' file.json | awk '{print tolower($0)}'
the above only lower cases the ID value's but now I also need to write those back into their correct spots.
Use the update operator with ascii_downcase builtin.
jq '.[].Id |= ascii_downcase' file
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With