I have some problem, I have an array like this
var obj = [{'person': {'name: 'foo', 'email': 'email.com'}, {'person': {'name: 'foo'}]
if i loop inside var obj, and want to get value email like this :
$.each(obj, function(index, value) {
console.log(value.person.email)
}
if I do like that, it shows an error because cannot read the property email.
how I pass it when the person does not have email ? or is there a way to create conditions like isset on php