I have this array:
var arr = [];
arr.push({name:"k1", value:"abc"});
arr.push({name:"k2", value:"hi"});
arr.push({name:"k3", value:"oa"});
is it possible to do get the value or a specific element by knowing the name ?
something like this:
arr['k2'].value
or
arr.get('k1')
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…