+ 1
How to get index number of object array using indexOf method only in JavaScript?
4 Respuestas
+ 3
for(i of arr){
console.log(arr.indexOf(i));
}
+ 2
Thanks Abhay and thanks to infinite too
+ 1
I did this way but I want to do it for this array given below:
var arr = [
{id : 1, value : 'a'},
{id : 2, value : 'b'}
] ;