Create a snippet named "dump.liquid" with the following code snippet
Note: if you use a different filename for the liquid snippet, make sure the variable being passed through liquid's json filter is also the same name, otherwise this shorthand usage won't work as expected
'dump.liquid'
<script type="text/javascript">
console.log("Dumping");
console.log({{ dump | json }});
</script>
Usage in template files:
{% include 'dump' with [OBJECT] %}
Example: Used within product.liquid template file
'product.liquid' {% include 'dump' with product %}
Open Chrome console and you will see an object that you can drill into and explore.