SlideShare a Scribd company logo
Logging in JavaScript - Part-5
Tabular visualization of logs:
The console.table() allows to display data in the
console in a nice tabular format.
const jsonData = [
{
color: "red",
value: "#f00"
},
{
color: "green",
value: "#0f0"
},
{
color: "blue",
value: "#00f"
}
];
console.table(jsonData);
Output:
Any type of JSON can be represented in a tabular view.
const y = [
["One", "Two"],
["Three", "Four"]
];
Output:
You can display an Array of Arrays in a tabular view
const x = { a: 1, b: { a: 1 } };
Output:
And, you can also display an object in a tabular view.
You may wonder how? Take a look at this example.
console.table() displays any object data in a tabular
view. But, if a JSON has multiple nested objects inside,
it just prints the root level objects in the tabular
view.
Let’s see that in this example,
const x = [
{ p: 123, i: 1 },
{
p: 124,
i: 2,
x: {
a: 1,
b: { s: 23 }
}
}
];
Output:
console.table() comes with an inbuilt sorting.
You can sort the table by a particular column by
clicking on that column's label.
const y = [
["One", "Two"],
["Three", "Four"]
];
console.table(y);
Output:
Sorting in logs

More Related Content

PDF
Excel/R
Andrija Djurovic
 
PDF
R-Excel Integration
Andrija Djurovic
 
DOCX
Some Examples in R- [Data Visualization--R graphics]
Dr. Volkan OBAN
 
PDF
TDC2017 | São Paulo - Trilha Android How we figured out we had a SRE team at ...
tdc-globalcode
 
PPTX
Connect() Mini 2016
Jeff Chu
 
PPTX
Python built in functions
Rakshitha S
 
PDF
Debug like a doctor
Ouadie LAHDIOUI
 
PPTX
Googlevis examples
Dr. Volkan OBAN
 
R-Excel Integration
Andrija Djurovic
 
Some Examples in R- [Data Visualization--R graphics]
Dr. Volkan OBAN
 
TDC2017 | São Paulo - Trilha Android How we figured out we had a SRE team at ...
tdc-globalcode
 
Connect() Mini 2016
Jeff Chu
 
Python built in functions
Rakshitha S
 
Debug like a doctor
Ouadie LAHDIOUI
 
Googlevis examples
Dr. Volkan OBAN
 

What's hot (20)

DOC
Rumus VB Menghitung Nilai Persamaan
T. Astari
 
PPT
Prgišče Lispa
Simon Belak
 
PDF
Functional Programming on Android: is it possible?
Lucas Albuquerque
 
KEY
重回帰職人の朝は早い
Masahiro Hayashi
 
DOCX
treemap package in R and examples.
Dr. Volkan OBAN
 
PPTX
Excel
AshokGugliya
 
PDF
Joclad 2010 d
a1000caroliveira
 
PDF
Functional Programming
chriseidhof
 
TXT
1b2 sql ddl_commands
Namdeo Thombare
 
PPTX
Python Set.pptx
RoopKumarDhanavath
 
PPTX
Multiquery optimization on spark
Bự Bụng
 
PPTX
Master's Thesis
Lorenzo Greco
 
PDF
openCypher: Technology Compatibility Kit (TCK) and Vendor Extensions
openCypher
 
PDF
メディアアートにおけるプログラミング言語Rubyの役割
Koichiro Eto
 
DOC
Sample sql
MaheshBabu Podapati
 
PDF
Traversals for all ocasions
Luka Jacobowitz
 
PDF
Sample2
Nima Rasekh
 
KEY
〇〇の常識は■■の非常識
Yoichi Hirai
 
PDF
Gopher conbr golang e data science - oficial
Rodrigo Pinheiro
 
PPTX
C# 6.0
Can BAKIR
 
Rumus VB Menghitung Nilai Persamaan
T. Astari
 
Prgišče Lispa
Simon Belak
 
Functional Programming on Android: is it possible?
Lucas Albuquerque
 
重回帰職人の朝は早い
Masahiro Hayashi
 
treemap package in R and examples.
Dr. Volkan OBAN
 
Joclad 2010 d
a1000caroliveira
 
Functional Programming
chriseidhof
 
1b2 sql ddl_commands
Namdeo Thombare
 
Python Set.pptx
RoopKumarDhanavath
 
Multiquery optimization on spark
Bự Bụng
 
Master's Thesis
Lorenzo Greco
 
openCypher: Technology Compatibility Kit (TCK) and Vendor Extensions
openCypher
 
メディアアートにおけるプログラミング言語Rubyの役割
Koichiro Eto
 
Traversals for all ocasions
Luka Jacobowitz
 
Sample2
Nima Rasekh
 
〇〇の常識は■■の非常識
Yoichi Hirai
 
Gopher conbr golang e data science - oficial
Rodrigo Pinheiro
 
C# 6.0
Can BAKIR
 
Ad

Similar to Logging in JavaScript - Part-5 (20)

PDF
Kotlin for Android Developers
Hassan Abid
 
DOCX
COMPUTER SCIENCE CLASS 12 PRACTICAL FILE
Anushka Rai
 
PDF
R basic programs
Priya Shetty
 
PPT
Collection Core Concept
Rays Technologies
 
PDF
Declarative Thinking, Declarative Practice
Kevlin Henney
 
PDF
Hive Functions Cheat Sheet
Hortonworks
 
PPTX
Python programming workshop
BAINIDA
 
PDF
Scott Anderson [InfluxData] | New & Upcoming Flux Features | InfluxDays 2022
InfluxData
 
PDF
Modular Module Systems
league
 
PPTX
Python 101++: Let's Get Down to Business!
Paige Bailey
 
PDF
Map, Reduce and Filter in Swift
Aleksandras Smirnovas
 
PDF
maths
Surya Swaroop
 
PDF
Oh, that ubiquitous JSON !
Alexander Korotkov
 
PPT
Array
Malainine Zaid
 
PPT
Collections Framework
Sunil OS
 
PDF
Data import-cheatsheet
Dieudonne Nahigombeye
 
DOCX
R scatter plots
Abhik Seal
 
PDF
2014-11-01 01 Денис Нелюбин. О сортах кофе
Омские ИТ-субботники
 
PDF
Py lecture5 python plots
Yoshiki Satotani
 
PDF
Clojure for Data Science
henrygarner
 
Kotlin for Android Developers
Hassan Abid
 
COMPUTER SCIENCE CLASS 12 PRACTICAL FILE
Anushka Rai
 
R basic programs
Priya Shetty
 
Collection Core Concept
Rays Technologies
 
Declarative Thinking, Declarative Practice
Kevlin Henney
 
Hive Functions Cheat Sheet
Hortonworks
 
Python programming workshop
BAINIDA
 
Scott Anderson [InfluxData] | New & Upcoming Flux Features | InfluxDays 2022
InfluxData
 
Modular Module Systems
league
 
Python 101++: Let's Get Down to Business!
Paige Bailey
 
Map, Reduce and Filter in Swift
Aleksandras Smirnovas
 
Oh, that ubiquitous JSON !
Alexander Korotkov
 
Collections Framework
Sunil OS
 
Data import-cheatsheet
Dieudonne Nahigombeye
 
R scatter plots
Abhik Seal
 
2014-11-01 01 Денис Нелюбин. О сортах кофе
Омские ИТ-субботники
 
Py lecture5 python plots
Yoshiki Satotani
 
Clojure for Data Science
henrygarner
 
Ad

More from Ideas2IT Technologies (20)

PDF
Version comaparison in JavaScript
Ideas2IT Technologies
 
PDF
Currying in JavaScript
Ideas2IT Technologies
 
PDF
JS Testing Frameworks
Ideas2IT Technologies
 
PDF
Cool usage of Encoding and Decoding a URI in Javascript
Ideas2IT Technologies
 
PDF
Iterables and Iterators in JavaScript
Ideas2IT Technologies
 
PDF
String comparison in javascript
Ideas2IT Technologies
 
PDF
JavaScript symbols
Ideas2IT Technologies
 
PDF
Json.parse() in JavaScript
Ideas2IT Technologies
 
PDF
Bubble sort in Java Script
Ideas2IT Technologies
 
PDF
Performance analysis in merging arrays - JavaScript
Ideas2IT Technologies
 
PDF
Nullish coalescing in JavaScript
Ideas2IT Technologies
 
PDF
Conditionally add keys in JavaScript
Ideas2IT Technologies
 
PDF
What is Big O in JavaScript - Part-1
Ideas2IT Technologies
 
PDF
Variable hoisting in JavaScript
Ideas2IT Technologies
 
PDF
Formidable ES6 spread operator in JavaScript
Ideas2IT Technologies
 
PDF
Logging in JavaScript - Part-4
Ideas2IT Technologies
 
PDF
Logging in JavaScript - Part-3
Ideas2IT Technologies
 
PDF
Logging in JavaScript - part-2
Ideas2IT Technologies
 
PDF
Logging in JavaScript - part-1
Ideas2IT Technologies
 
PDF
Array vs set in JavaScript
Ideas2IT Technologies
 
Version comaparison in JavaScript
Ideas2IT Technologies
 
Currying in JavaScript
Ideas2IT Technologies
 
JS Testing Frameworks
Ideas2IT Technologies
 
Cool usage of Encoding and Decoding a URI in Javascript
Ideas2IT Technologies
 
Iterables and Iterators in JavaScript
Ideas2IT Technologies
 
String comparison in javascript
Ideas2IT Technologies
 
JavaScript symbols
Ideas2IT Technologies
 
Json.parse() in JavaScript
Ideas2IT Technologies
 
Bubble sort in Java Script
Ideas2IT Technologies
 
Performance analysis in merging arrays - JavaScript
Ideas2IT Technologies
 
Nullish coalescing in JavaScript
Ideas2IT Technologies
 
Conditionally add keys in JavaScript
Ideas2IT Technologies
 
What is Big O in JavaScript - Part-1
Ideas2IT Technologies
 
Variable hoisting in JavaScript
Ideas2IT Technologies
 
Formidable ES6 spread operator in JavaScript
Ideas2IT Technologies
 
Logging in JavaScript - Part-4
Ideas2IT Technologies
 
Logging in JavaScript - Part-3
Ideas2IT Technologies
 
Logging in JavaScript - part-2
Ideas2IT Technologies
 
Logging in JavaScript - part-1
Ideas2IT Technologies
 
Array vs set in JavaScript
Ideas2IT Technologies
 

Recently uploaded (20)

PPTX
Visualising Data with Scatterplots in IBM SPSS Statistics.pptx
Version 1 Analytics
 
PPTX
Explanation about Structures in C language.pptx
Veeral Rathod
 
PDF
On Software Engineers' Productivity - Beyond Misleading Metrics
Romén Rodríguez-Gil
 
PDF
The Role of Automation and AI in EHS Management for Data Centers.pdf
TECH EHS Solution
 
PDF
QAware_Mario-Leander_Reimer_Architecting and Building a K8s-based AI Platform...
QAware GmbH
 
PPTX
AI-Ready Handoff: Auto-Summaries & Draft Emails from MQL to Slack in One Flow
bbedford2
 
PDF
IEEE-CS Tech Predictions, SWEBOK and Quantum Software: Towards Q-SWEBOK
Hironori Washizaki
 
PDF
Exploring AI Agents in Process Industries
amoreira6
 
PDF
Jenkins: An open-source automation server powering CI/CD Automation
SaikatBasu37
 
PPTX
classification of computer and basic part of digital computer
ravisinghrajpurohit3
 
PDF
What to consider before purchasing Microsoft 365 Business Premium_PDF.pdf
Q-Advise
 
PDF
Protecting the Digital World Cyber Securit
dnthakkar16
 
PPTX
TestNG for Java Testing and Automation testing
ssuser0213cb
 
PDF
Wondershare Filmora 14.5.20.12999 Crack Full New Version 2025
gsgssg2211
 
PDF
49784907924775488180_LRN2959_Data_Pump_23ai.pdf
Abilash868456
 
PPTX
ASSIGNMENT_1[1][1][1][1][1] (1) variables.pptx
kr2589474
 
PDF
49785682629390197565_LRN3014_Migrating_the_Beast.pdf
Abilash868456
 
PDF
Micromaid: A simple Mermaid-like chart generator for Pharo
ESUG
 
PPTX
ConcordeApp: Engineering Global Impact & Unlocking Billions in Event ROI with AI
chastechaste14
 
PPTX
Maximizing Revenue with Marketo Measure: A Deep Dive into Multi-Touch Attribu...
bbedford2
 
Visualising Data with Scatterplots in IBM SPSS Statistics.pptx
Version 1 Analytics
 
Explanation about Structures in C language.pptx
Veeral Rathod
 
On Software Engineers' Productivity - Beyond Misleading Metrics
Romén Rodríguez-Gil
 
The Role of Automation and AI in EHS Management for Data Centers.pdf
TECH EHS Solution
 
QAware_Mario-Leander_Reimer_Architecting and Building a K8s-based AI Platform...
QAware GmbH
 
AI-Ready Handoff: Auto-Summaries & Draft Emails from MQL to Slack in One Flow
bbedford2
 
IEEE-CS Tech Predictions, SWEBOK and Quantum Software: Towards Q-SWEBOK
Hironori Washizaki
 
Exploring AI Agents in Process Industries
amoreira6
 
Jenkins: An open-source automation server powering CI/CD Automation
SaikatBasu37
 
classification of computer and basic part of digital computer
ravisinghrajpurohit3
 
What to consider before purchasing Microsoft 365 Business Premium_PDF.pdf
Q-Advise
 
Protecting the Digital World Cyber Securit
dnthakkar16
 
TestNG for Java Testing and Automation testing
ssuser0213cb
 
Wondershare Filmora 14.5.20.12999 Crack Full New Version 2025
gsgssg2211
 
49784907924775488180_LRN2959_Data_Pump_23ai.pdf
Abilash868456
 
ASSIGNMENT_1[1][1][1][1][1] (1) variables.pptx
kr2589474
 
49785682629390197565_LRN3014_Migrating_the_Beast.pdf
Abilash868456
 
Micromaid: A simple Mermaid-like chart generator for Pharo
ESUG
 
ConcordeApp: Engineering Global Impact & Unlocking Billions in Event ROI with AI
chastechaste14
 
Maximizing Revenue with Marketo Measure: A Deep Dive into Multi-Touch Attribu...
bbedford2
 

Logging in JavaScript - Part-5

  • 2. Tabular visualization of logs: The console.table() allows to display data in the console in a nice tabular format. const jsonData = [ { color: "red", value: "#f00" }, { color: "green", value: "#0f0" }, { color: "blue", value: "#00f" } ]; console.table(jsonData); Output:
  • 3. Any type of JSON can be represented in a tabular view. const y = [ ["One", "Two"], ["Three", "Four"] ]; Output: You can display an Array of Arrays in a tabular view const x = { a: 1, b: { a: 1 } }; Output: And, you can also display an object in a tabular view. You may wonder how? Take a look at this example.
  • 4. console.table() displays any object data in a tabular view. But, if a JSON has multiple nested objects inside, it just prints the root level objects in the tabular view. Let’s see that in this example, const x = [ { p: 123, i: 1 }, { p: 124, i: 2, x: { a: 1, b: { s: 23 } } } ]; Output:
  • 5. console.table() comes with an inbuilt sorting. You can sort the table by a particular column by clicking on that column's label. const y = [ ["One", "Two"], ["Three", "Four"] ]; console.table(y); Output: Sorting in logs