Skip to content

Instantly share code, notes, and snippets.

Created April 20, 2016 10:56
  • Star 60 You must be signed in to star a gist
  • Fork 3 You must be signed in to fork a gist
Star You must be signed in to star a gist
What would you like to do?
Debugging Objects in Shopify Templates
<script>console.log({{ product | json }});</script>
Copy link

I accessed the properties of the object until it allowed me to do it in my last project.

For example...

<script>console.log({{ product.images | json }});</script>

When I first posted this product supported JSON, but I guess now it doesn't.

This snippet was a quick way of me examining the object without looking at the docs, maybe not quite as useful now.

Copy link

gdSuhail commented Jun 2, 2022


Copy link

Good job

Copy link

thanks so much! 🙇 🙌

Copy link

really thanx!!!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment