Basically, if a candidates id is found in the candidates_ignore array, then they should be added to the rejected list, otherwise they will be added to the included list
All the candidates apart from id 33 are in the list. But for some reason the one with id 33 is being included not rejected
see this screenshot
As you can see in the console, 33 is not in the ignore list so that should be included. But for whatever reason 23 is being included even though he is in the ignore list??
The code:
if($.inArray(cand.id, candidates_ignore)) {
$results_rejected.append(output);
}
else {
$results_included.append(output);
}
The full code: