Lava Filters - WithFallback
Category:Text
Description:This filter allows you to eliminate conditional tests for null or empty values by allowing you to provide fallback text.
Input: "CurrentPerson": {
"NickName": "Ted",
...
}
Lava: {{ CurrentPerson.NickName | WithFallback:', are', 'Are', 'append' }} you interested in baptism?
Output: Ted, are you interested in baptism?
- or if {{ CurrentPerson }} was null -
Are you intersted in baptism?