I want to delete one of the duplicated elements in a more dimensional array. This was my code so far:
for (var i = 0; i< blog.length; i++){
for (var i = 0; i< blog.length; i++){
var check1 = blog[i][1];
var check2 = blog[j][1];
//check1 = 120;;200 check2 = 130;;180
if (check1 == check2){
blog[i].splice(i, 1);
}
}
}
- I want only delete the first element of the duplicated pair.
- Can you give me a more smart code for that?