json - Liquid Filter Reference
On this page
Description
Converts the collection to JSON.
| Property | Value |
|---|---|
| Return Type | string |
| Category | collections |
| Alias | serialize |
Examples
liquid
{{ pets | json }}
Output: [{"name":"Fido","type":"dog"},{"name":"Mittens","type":"cat"}]