I am getting a json object like this
{
"First": "MyName's",
"Last": "MyLast"
}
I want to stringify this object so that ‘s in value become \'
it could be ‘s or ‘S or ‘anything
I am using JSON.stringify(json_obj) but its giving me string
"{"First":"MyName's","Last":"MyLast"}"
you can see MyName’s I want this to MyName\’s
Try using a regex replace incase if you going to have more than once such values,
DEMO: http://jsfiddle.net/qMsyg/2/