How do you escape double quotes if the JSON string is the following?
var str = "[{Company: "XYZ",Description: ""TEST""}]"
I want to escape the secondary double quotes in value TEST.
I have tried the following, but it does not work.
var escapeStr = str.replace(/""/g,'"');
What am I missing?
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…