Multi-layer array nesting to get the value of the object in the innermost array

how to get the values of objects in an array in the inner layer by nesting a multi-layer array

arr= [{id:11}]

give this to

with recursive exit conditions.
Apr.15,2022

arr=[[[[{id:11}]]]]
while(Array.isArray(arr)) {
    arr = arr[0]
}
console.log(arr.id)
Menu