Display objects and arrays as a table using javascript console methods in Salesforce Lightning Component
We can display as Table from console using Javascript console methods.
console.table() –
https://developer.mozilla.org/en-US/docs/Web/API/console/table
You can use console.table to display objects and arrays as a table.
This can be a really handy way to visualize data, and we can use it in Salesforce Lightning Components (AURA/LWC) for debugging purpose.
Here simple way to Debugging in Lightning Components (AURA/LWC) using Javascript Console Objects called console.table()
Here is the Example to display table format in Lightning Components (AURA/LWC)
Display Entire Table:
console.table(result);
Display Specific columns:
console.table(result,[‘Name’,’Type’]);