How do i parse the following string
var a = JSON.parse('[' + '{"NoteName":"it's my life","UserId":"100","NoteActive":true,"UserEmail":"[email protected]","CreatedDate":"8/13/2012 1:47:35 PM"}' + ']');
You have just to escape a single quote it\'s
var a = JSON.parse('[' + '{"NoteName":"it\'s my life","UserId":"100","NoteActive":true,"UserEmail":"[email protected]","CreatedDate":"8/13/2012 1:47:35 PM"}' + ']');
console.log(a);
Replace it's
with it\'s
'[' + '{"NoteName":"it\'s my life","UserId":"100","NoteActive":true,"UserEmail":"[email protected]","CreatedDate":"8/13/2012 1:47:35 PM"}' + ']'
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With