How to pretty print log output in Chrome DevTools Console?

google-chrome, google-chrome-devtools

Solution

You could format the data as JSON:

console.log(JSON.stringify({foo:1, bar:2}, null, 4));

{
    "foo": 1,
    "bar": 2
} 

Problem

I'm hoping to be able to pretty print array objects and such in the Console of Chrome DevTools. Is there any means to achieve this? Thank you!

Original source