+4 votes
by (2.7k points)
reopened by
I would like to print Object Content in Chrome DevTools. How can I print?

1 Answer

+5 votes
by (1.6k points)
selected by
 
Best answer

Note : you must only log the object. For example this won't work :

With Chrome

var obj = {prop1: 'prop1Value', prop2: 'prop2Value', child: {childProp1: 'childProp1Value'}}
console.log(obj)

will display

screenshot console chrome

Note : you must only log the object. For example this won't work :

console.log('My object : ' + obj)

statcounter statistics counter
...