Skip to main content

bool

Function bool 

Source
pub fn bool(state: &State<'_, '_>, value: &Value) -> Result<bool, Error>
Expand description

Converts the value into a boolean value.

This behaves the same as the if statement does with regards to handling of boolean values.

{{ 42|bool }} -> true