javascript - Regex to remove some special character occurring multiple times in string -
i have string following in javascript:
"[ \"\\"[[\\"leadownerkey\\",\\"suyog\\",\\"praneet\\"], [\\"open\\",\\"1\\",\\"1\\"], [\\"total count\\",\\"1\\",\\"1\\"]]\\"\" ]"
i have remove occurrences of \
, "
have keep occurrences of [
, ]
, ,
.
can suggest regex it? or there other way achieve it?
str = str.replace(/[\\"]/g, '');
outputs:
[ [[leadownerkey,suyog,praneet], [open,1,1], [total count,1,1]] ]
Comments
Post a Comment