<script>
let arr = [5,3,4]
let arr2 = [[6,5],3,4]
let obj = {arr: [2,0,1], arr2: [[6,5],3,4]};
let obj2 = {x: {y: {z: 1}}};
function change() {
// this is not update the view:
obj.arr = obj.arr.sort();
obj.arr[0]++
obj.arr[0] += 1
obj.arr[0] = 2
obj.arr2[0][0]++
obj.arr2[0][0] = 3
// this is worked:
obj2.x.y.z++
arr = arr.sort();
arr2[0][1]++
}
setTimeout(change,1)
</script>
Probjem with update array property:<br>
Array: {arr} - OK<br>
Object in Object: {obj2.x.y.z} - OK<br>
Array in Array: {arr2} - OK<br>
<br>
Array in Object: {obj.arr} - Not OK<br>
Array in Array in Object: {obj.arr2} - Not OK<br>