Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

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');
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #index #item #attribute #javascript
ADD COMMENT
Topic
Name
2+4 =