To expand all properties automatically and not read Object
or Array[l]
everywhere, a common technique is to log the prettyfied JSON representation. It also has the benefit of not changing in the console when your objects are mutated after being logged. You only should not do it with very large objects, and it's impossible on cyclic objects.
console.log(JSON.stringify(tree, null, 4));