IndexOf by Object Key

var index = peoples.findIndex(p => p.attr1 == "john")
Lively Lizard