Lava Filters - AsBoolean

Category:Other

Description:Converts the input to a Boolean (true/false) value.
Input: "Workflow": { "Option": "f" }
Lava: {% assign isEnabled = Workflow | Attribute:'Option' | AsBoolean %} {% if isEnabled == true %} It is enabled. {% else %} Nope, it's disabled. {% endif %}
Output: Nope, it's disabled.