function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Fred13Fred13 

How do I see the contents of variables in the console?

Is there a way that I can actually see the contents of the variable I create rather than just object?  In sample below, I am printing to the console log the value of the components v.groupstructureList... but when I look at the console in chrome, I just see object and not the actual values? thanks!!!

Fred

User-added image
Best Answer chosen by Fred13
Raj VakatiRaj Vakati
try like this
 
console.log(JSON.parse(JSON.stringify(component.get("v.groupstructureList") )));
               

OR
 
console.log(JSON.stringify(component.get("v.groupstructureList") , null, 4))

 

All Answers

Raj VakatiRaj Vakati
try like this
 
console.log(JSON.parse(JSON.stringify(component.get("v.groupstructureList") )));
               

OR
 
console.log(JSON.stringify(component.get("v.groupstructureList") , null, 4))

 
This was selected as the best answer
Fred13Fred13
Thank you!!!!

Fred