I get this response from an Ajax request. Javascript seems to intepret it as a string. (When I say alert this.responseText, the whole string is shown)
How can i convert it to a javascript object (JSON)?
{"response": {
"success": "The activity has been removed",
"message": "0"
}
}
I am not using jquery.
If you use jQuery, JSON.parse(this.responseString);
or jQuery.parseJSON(this.responseString);
should work.
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