find the value of a specific key index in and object js code example Example: indexOf by object key var index = peoples.findIndex(p => p.attr1 == "john")