I am using a file upload plugin for one of my sites and a callback function of the "Delete" option returns a jSON response that looks like this:
{"5425ba85c976a~2014-09-26_7-13-47.png":true}
How would I go about parsing this jSON response in jQuery to know if the value is true or false?
This is what my code looks like but it prints undefined when i log this
$(document).on('click', '.delete', function(e) {
var fileName = $(this).attr('filename');
$.ajax({
url: "server/php/?action=DELETE&file="+fileName,
type: 'GET',
error: function (err) {
alert(err.statusText);
},
success: function (data) {
console.log(data.fileName);
}
});
});