I tried using JSON.stringify(object) , but it doesn't go down on the whole structure and hierarchy.

On the other hand console.log(object) does that but I cannot save it.