When the JSON response is empty and viewed in the browser console, it appears like this:
{"data":{},"status":200,"config":{"method":"GET","transformRequest":[null],"transformResponse":[null],"jsonpCallbackParam":"callback","url":"http://url/form/BN217473","headers":{"Accept":"application/json, text/plain, */*"}},"statusText":"","xhrStatus":"complete"}
Although I am attempting to check for an empty response in my angular script, the logic block is not capturing it and remains unexecuted.
if (response.data == '') {
console.log("no data found");
}
How can I properly verify that my response is indeed not empty?