'in array in big array jQuery not show result but if check like result

0: {color: '', size: 'error_check'}
1: {color: '', size: ''}
2: {color: '', size: ''}

in array query not working this my code

if(jQuery.inArray('error_check', error)) {
   console.log("is in array");
} else {
   console.log("is NOT in array");
}


Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source