Can I use ES6 template strings to pretty print javascript objects? This is from a React Native project, with console.log()
outputting to Chrome debugging tools.
What I Want
const description = 'App opened';
const properties = { key1: 'val1', blah: 123 };
console.log('Description: ', description, '. Properties: ', properties);
outputs
Template String Attempt
// Same description and properties
const logString = `Description: ${description}. Properties: ${properties}`;
console.log(logString);
outputs
Question
How do I get the first output (with the pretty printing) using template strings?