My JavaScript object is deeply nested with an infinite number of children, each containing a value.
var object = {
value: 1,
children: {
value: 10,
children:{
value: 2,
children: {...}
}
}
}
I've tried creating a recursive function to traverse the entire object structure, but so far it only goes down to a certain depth.