console.log(response.key);
console.log(answersNeedToBeBoolean);
console.log($.inArray(response.key, answersNeedToBeBoolean));
Output in console:
177
[8, 177, 179, 181]
-1
These seems pretty cut and dry to me. Clearly 177 is in the array. How on earth could it not find it?
console.log(jQuery.isArray(answersNeedToBeBoolean))answersNeedToBeBooleanis an array of int values where asresponse.keyis a string so tryconsole.log($.inArray(+response.key, answersNeedToBeBoolean));