Control no data received in a rest api
I'm using API Express and it works perfect.
But I have a lilte problem. I have some services that maybe it does not return any data.
In that case I try everything, JS in success:
if (data.leght===null) {
alert("No tiene depositos en este momento activos");
}
if (data.leght===0) {
alert("No tiene depositos en este momento activos");
}
Not working.
Do someone know how to solve this problem??
Thanks