kinlane
9/17/2016 - 10:56 PM

Dynamic Products JSON in Liquid

Dynamic Products JSON in Liquid

---
layout: none
---
[{% for product in site.data.products %}
  {
    "id": "{{ product.id }}",
    "name": "{{ product.name }}",
    "description": "{{ product.description }}",
    "price": "{{ product.price }}"
  }{% if forloop.last == false %},{% endif %}
{% endfor %}]