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"}]
Was this article helpful?
Thanks for your feedback! It helps us improve our docs.