I have an object, say object obj. Obj has several properties(int id, boolean status, etc) and I know I want to access some of the properties. Yet because I do not know where I defined this object, I would like to know the best way to display all the properties of the object using console.log.
Hey all, when I tried using console.log(obj);
it did not work. That is the reason I posted this question. For some reason, in my application; it returned obj obj instead of the properties or letting me open up the properties. I haven't tried the console.log(JSON.stringify(obj));
but the command console.log(Object.getOwnPropertyNames(intended_obj));
worked exactly as intended.