I have a jquery plugin that uses ajax to upload to the server. in the progress function I have logged the content of data to the console.
progress: function(e, data){
console.log(data);
if (data.result.status == 2) {
//do something
}
}
In the console I can see the result object that contains status and message.
If I try to access the status variable (data.result.status) I get the following error:-
TypeError: data.result is undefined
if (data.result.status == 2) {
Any ideas on what I'm doing wrong?
Regards