const language = this.converstaionLanguage; // {"lang":"en"} <- this is JSON
console.log(language); // [object Object]
console.log(JSON.stringify(language) // {"lang":"en"}
const obj={
firstName: 'John',
lastName: 'MacDonald',
age: 32,
pets: true
};
console.log(obj); // {firstName: 'John', lastName: 'MacDonald', age: 32, pets: true}
console.log(`${obj}`); // [object Object]
console.log(`${JSON.stringify(obj)}`); // {"firstName":"John","lastName":"MacDonald","age":32,"pets":true}
console.log(Object.keys(obj)); // ['firstName', 'lastName', 'age', 'pets']
console.log(Object.values(obj)); // [ 'John', 'MacDonald', 32, true ]
console.log(Object.getOwnPropertyNames(Math));
//-> ["E", "LN10", "LN2", "LOG2E", "LOG10E", "PI", ...etc ]
console.dir(myObject, { depth: null }); // `depth: null` ensures unlimited recursion
console.log(Object.getOwnPropertyNames(Math).filter(function (p) {
return typeof Math[p] === 'function';
}));
//-> ["random", "abs", "acos", "asin", "atan", "ceil", "cos", "exp", ...etc ]