var arr = [{id:1,"name":"John"},{id:2,"name":"James"}]
$.each(arr, function(){
if(this.id == 1){
//change john to Johnathan
}
});
without using key, is it possible to alter array object?
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…