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.
It’s not the safest thing in the world, but you can do this:
It might be a little safer to do:
but there are still all sorts of potential hacks. You’re better off using a library.