I am using cakePHP for my project and i have the following Jquery script
$.ajax({
url: '<?php echo $this->Html->url(array("action" => "retrieveVideoFeed"));?>',
dataType: "json",
data: {
vid: $v_id
},
success: function( data) {
response([data]);
}
});
Now i want to use the response data from the controller and when i do :
data.example, it should give the value of the json type that is responded by the controller. However, firebug is complaining that data is not defined. If that is the case, how can i use the response data in the ajax? However the firebug is showing the response data. I just need to know how can i use access the responded data from jquery.
thsi is the
jsonyou are getting as you have posted in the commentsaccess it in the success handler like