function inArray(src, find, findByKey) {
	    if (src.indexOf && !findByKey) {
	        return src.indexOf(find);
	    } else {
	        var i = 0;
	        while (i < src.length) {
	            if ((findByKey && src[i][findByKey] == find) || (!findByKey && src[i] === find)) {
	                return i;
	            }
	            i++;
	        }
	        return -1;
	    }
	}
find if a array contains the object using indexOf or a simple polyFill
@param {Array} src
@param {String} find
@param {String} [findByKey]
@return {Boolean|Number} false when not found, or the index