ydai6a
Last Updated: February 25, 2016
·
1.376K
· colemike
1140 36572794390 101 n

Displaying JSON as a Table in Dev Tools Console

If you are dealing with blobs of JSON in your app and need a way to easily visually inspect it, here's a simple method:

var team =
[{"name":"Jason Nissen","username":"jasonnissen","badges_count":0,"endorsements_count":0},                {"name":"Chris Rouw","username":"chrisrouw","badges_count":0,"endorsements_count":0},{"name":"Chad Feldmann","username":"cfeldmann","badges_count":0,"endorsements_count":0},{"name":"Tyler Kane","username":"tykane91","badges_count":0,"endorsements_count":0},{"name":"Mike Cole","username":"colemike","badges_count":4,"endorsements_count":0},{"name":"Lana Wrage","username":"farreachlana","badges_count":0,"endorsements_count":0}];

console.table(team);

produces a simple, sortable table in your dev tools console.

See it in action here: http://jsfiddle.net/colemike/5qrgz8hs/

Say Thanks
Respond

1 Response
Add your response

16463
Toledo octubre 2013

Works also great with arrays ..

over 1 year ago ·