serialize - Liquid Filter Reference - 1.1.0
Filter Name | serialize |
Group | Collections |
Version | 1.1.0 |
Description
Serializes the collection as a JSON string
Examples
{% new List pets = '[{"id":1,"name":"Dog"},{"id":2,"name":"Cat"}]' %}
{{ pets | serialize }}
[{"id":1,"name":"Dog"},{"id":2,"name":"Cat"}]
Back to Liquid Reference for 1.1.0
Back to Documentation