I have a jquery $.ajax call and in my success callback, I have this
success: function(response) {
console.log('response = '+response);
console.log('response.validate = '+response.validate);
}
Here’s my console output in Firebug:
response = {"validate":true}
response.validate = undefined
How the heck is response.validate equal to undefined?
Add this ajax option:
If you don’t tell jQuery that you are returning
JSONand you don’t set the proper headers, jQuery doesn’t know how to process it.