How do I create a javascript object from an AJAX response?
This is what I'm currently doing:
PHP:
<?
echo '{status:"1", site:"example.com"}';
?>
JS:
success:function(data_response){
var object = eval( data_response );
console.log(object.url);
}});
I'm currently getting "undefined" on the console. How is this done?