I have an object,
data: [
{
"name": "aaa",
"email": null,
"username": "bbb",
"age": 56,
"dob": null,
},
{
"name": "ddd",
"email": null,
"username": "ggg",
"age": 46,
"dob": null,
},
]
If i append the data like,
$.each(data,function(i,e){
.........
$(".email").text(e.email);
.........
})
I got an error
Cannot read property 'email' of null
So, If there is an null value in the object i want to append it as a empty string.
How can i make it.
e.emailis null, it is sayingeis null and with that code, that is impossible.