To see it in action, we can simply display the value of an object in our Vue instance.
- Write the following JavaScript:
new Vue({ el: '#app', data: { cat: { sound: 'meow' } } })
This just creates a cat object in our code with a string inside.
- Write the following HTML:
<p>Cat object: {{ cat }}</p>
- Run your app and notice how the cat object is outputted in all it's beauty, just like JSON.stringify.