I'm trying to figure out how I can do an if statement with this code. The if statement is supposed to determine whether or not the li gets a class name or not depending on if its read or not. What determines it is the data[x][messageRead] == 0 or not but not sure how to do this inside of this append.
$.each(data, function(x)
{
$('.mail').append('<li><a href=""><strong>Received: '+data[x]['dateSent']+'</strong><small>'+data[x]['subject']+'</small><small>From: '+data[x]['firstName']+' '+data[x]['lastName']+'</small></a></li>');
});