try - Liquid Filter Reference - 1.0.0
| Filter Name | try | 
| Group | Collections | 
| Version | 1.0.0 | 
Description
Tries to call the supplied attribute against the supplied object. Use this when you know the property may or may not exist on the object as a way to indicate that it’s expected and ok for it not to exist.
Examples
{{ error_1 | try: "code" }}
{{ error_2 | try: "code" }}
RED
Back to Liquid Reference for 1.0.0
Back to Documentation