let arr = [
{src: "1.jpg", thumb: "1.jpg"},
{src: "2.jpg", thumb: "2.jpg"},
{src: "3.jpg", thumb: "3.jpg"},
{src: "4.jpg", thumb: "4.jpg"},
{src: "5.jpg", thumb: "5.jpg"},
{src: "6.jpg", thumb: "6.jpg"},
];
let model = "4.jpg";
var index = arr.findIndex(el=> el.src == model);
alert(index);