if(place.photos != undefined){
alert('ok');
}
It means that there is a photos
tag in it.
Pregunta
I am using the google places api library and have come upon a problem, I am needing to see if the array is empty e.g if any photo exists
I have tried a few things, this being one of them.
var photoz = place.photos;
if (photoz[0] != null) {
alert('ok');
}
does anybody have any proposals to this problem.
Solución
if(place.photos != undefined){
alert('ok');
}
It means that there is a photos
tag in it.
Otros consejos
you can also try this.
if(place.photos){
alert('photo tag exist');
}