indexOf by object key
var index = peoples.findIndex(p => p.attr1 == "john")
4.4
15
const index = Data.findIndex(item => item.name === 'John');
Thank you!
15
0
Are there any code examples left?
New code examples in category Javascript