I've a Javascript array and pushing the elements for later usage like this:
var array = [jQuery('.first').eq(0)];
Now if I try to check if the same element in array exists, it returns -1
jQuery.inArray(jQuery('.first').eq(0), array)
What is the perfect way to find if the object exists in array or not.