It looks like this question is essentially a duplicate of yours.
The accepted answer for that question uses the console object to print the contents of the object to the JavaScript debugging console in the browser's developer tools (usually accessible with F12). You can typically interact with the object, expanding and collapsing its properties, in the logged output in the console.
console.log(my_obj);
However, this doesn't provide an easy way to print the contents of the object to the webpage. For that, you can follow the above-linked question's highest-voted answer, which uses the JSON object, specifically it's stringify
method.
var my_obj_str = JSON.stringify(my_obj);
This method returns a stringified version of your object (i.e. it will appear like an object literal), which can then either be logged to the console like above (although it would be a string, not an interactive object!), or put into the webpage in whatever manner you like putting strings into webpage content.