Array operation two-dimensional array operation

var sava = []
var obj = {arr:[{arr[{arr[],id:4}],id:2},{arr[],id:3}],id:1}

there is an arr array and an id,arr array in the

object obj, and there is a child arr array and an id, in it. I want to put each id no matter how many levels (actually up to three layers)

.

1.
write a function to get it recursively.

2.

  

often look upstairs to answer, the answer is innovative

Menu