I have a big problem with recursion, callback and nodejs.
I have this object for exemple :
var a= [
{index : 1},
{index : 2},
{index : [
{index : 11},
{index : 12},
{index : [
{index : 111},
{index : 112},
{index : "end-of-tree"},
]},
]},
{index : 4},
]
And I would like to display sequentially this:
1
2
11
12
111
112
end-of-tree
4
with console.log(value)
In pure javascript it's easy but as node run asynchronously, it's a bit more complicated.
Who could help me ?