I am facing trouble to replace some value inside a string.
{"key1":"value1","key2":"value2","key3":"value3","key4":"djdhsja","BizProcessNm":"value5",.........}
I have to replace the value of key4 to "something". As shown below
{"key1":"value1","key2":"value2","key3":"value3","key4":"something","BizProcessNm":"value5",.........}
The problem is I don't know the exact value inside the value of key4. In this case, "djdhsja" is the value. It will be random.
I thought of getting the position of key4 in the string and then based on the string position, replace the content after first " till it ends with "something". But this may be a little complicated as i have to do this for so many strings inside a for loop(The loop was written by someone else, I am just modifying it).
Is there any regex kind of find and replace like sed in linux.
edit: The position of key4 is random