Answers for "get index of item with attribute javascript"

0

get index of item with attribute javascript

var Data = [
    {id_list:1, name:'Nick', token:'312312'},
    {id_list:2, name:'John', token:'123123'}
]

var index = Data.map(function(e) { return e.name; }).indexOf('Nick');
Posted by: Guest on July-26-2021

Code answers related to "get index of item with attribute javascript"

Code answers related to "Javascript"

Browse Popular Code Answers by Language