var le = [{name:"js"}, {name:"css"}, {name:"python"} ]; var index = le.findIndex(function(item){ return item.name== "css"; }); console.log(index);1