Console Log JavaScript Objects to See Data Structure [code snippet]

When working with JavaScript objects and arrays it is often tricky to reference the correct index of the data you need. These console functions allow you to visually see the structure so that job is a bit easier.

Writes your object as a data table and also dropdown menu

console.table($yourObject);

Writes your object as a string

console.log(JSON.stringify($yourObject))

Source

The post Console Log JavaScript Objects to See Data Structure [code snippet] appeared first on Bootstrap Creative.

Generated by Feedzy