[Fixed]-Django REST undefined JSON

1👍

According to the docs, the success function has this signature:

Function( Anything data, String textStatus, jqXHR jqXHR )

For example:

success: function (data, status, xhr) {
console.log(data.country_name[0] === 'BHUTAN'); // Prints true
}

Leave a comment