You can iterate over the properties of an object with for...in
, like
$('td.status4').each(function() {
for (var i in object) {
if (object[i] === $(this).text()) {
$(this).closest('tr').css('background-color','#f4f1a2');
break;
}
}
});