var array = [1,2,3, [{object:1},{object:25},{object:3}]] var str = JSON.stringify(array[3]); if(str.includes(5) && str.includes(2)) alert('Ура!');