jQuery multiple conditions within if statement
javascript, jquery
Solution
Try
if (!(i == 'InvKey' || i == 'PostDate')) {
or
if (i != 'InvKey' || i != 'PostDate') {
that says if i does not equals `InvKey` OR `PostDate`
Problem
What is the syntax for this loop to skip over certain keys? The way I have it written is not working properly. ``` $.each(element, function(i, element_detail){ if (!(i == 'InvKey' && i == 'PostDate')) { var detail = element_detail + ' '; $('#showdata').append('<div class="field">' + i + detail + '</div>'); } }); ```