我有一个字符串看起来像:
var myString= '{"key1":"value1", "key2":"value2", "key3":"value3"}';
我想要的是仅从 value3 中删除双引号和其他特殊字符 ...例如,有时我们的字符串如下所示:
var myString= '{"key1":"value1", "key2":"value2", "key3":"This is "value" with some special chars etc"}';
请注意,我不想在冒号之后和之前删除双引号,同样我也不想删除最后一个双引号。我只想修改字符串,使其变为:
var myString = '{"key1":"value1", "key2":"value2", "key3":"This is value with some special chars etc"}';