javascript - Removing "\"" from json string -


hello trying remove following example jsonstring

"work_desc":"hello\"world" 

tried following;

jsonstring = jsonstring.replace(new regexp('\\\"', 'g'), ' '); 

would transform this:

[{"pigsback":0,"work_desc":"hello\"world","owner":"jbb"}] 

to:

[{"pigsback":0,"work_desc":"hello world","owner":"jbb"}] 

currently above replace code this:

[{  pigsback :0 work_desc : hello  world , owner :  }] 

any ideas?

you turn json object handle of you..

json.parse(jsonstring); 

Comments

Popular posts from this blog

c++ - Difference between pre and post decrement in recursive function argument -

php - Nothing but 'run(); ' when browsing to my local project, how do I fix this? -

php - How can I echo out this array? -