Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR TYPESCRIPT

when i console log a obj its printing object

var obj = {id : "007", name : "James Bond"};
console.log(obj);                    // Object { id: "007", name: "James Bond" }
console.log(JSON.stringify(obj));    //{"id":"007","name":"James Bond"}
if (obj.hasOwnProperty("id")){
    console.log(obj.id);             //007
}
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #console #log #obj #printing #object
ADD COMMENT
Topic
Name
5+2 =