If I have array:
var arr = [
{
text: "something",
child: [
{
text: "something child",
child: [..]
},..
]
},..
];
Is ther any more efficient way exept rebuilding whole array with updated value by using for() to edit element when I have array of indexes:
var index = [0, 0];
to do this:
arr[0]["child"][0]["text"] = "updated value";
This is just small example but arr will be sometimes 1 level depth sometimes 12, etc. And value I need to update sometimes is in first level:
arr[0]["text"] = "updated value"
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…