parse_json
Parse JSON text into a typed template value.
Syntax
1{{ value | parse_json }}Usage
- Invalid JSON is returned unchanged with a nonfatal warning.
- Values that are already typed are returned unchanged.
- Collection-aware filters recognize serialized arrays and objects automatically, so ordinary collection chains do not require
parse_json.
Example
Open in Playground| Data | |
|---|---|
| Template | |
| Output | |