Display Javascript Object In WebPage Without Knowing Its structure

I want to Display javascript document object in webpage, in the same way it is displayed in console as object opening as dropdown. Is there any way by which we can display a javascript object on webpage without knowing its structure in the same way as console does? Answer Check this out: