Handlebar Helper Function: Equals

Compares two values for equality. It can perform different types of comparisons based on an optional third parameter.

Availability 

This helper is available in the Winter ’26 release of Marketing Cloud Next (API version 65.0).

Syntax 

1{{equals value1 value2 compareAs}}

Parameters 

ParameterTypeDescription
value1AnyThe first value to compare.
value2AnyThe second value to compare.
compareAsStringThe type of comparison to perform. Possible values: date, datetime, number, string. The default value is string.

Return Value 

The function returns true if the values are equal based on the specified comparison type, and false otherwise. If both values are null, it returns true. If no parameters are provided, it returns true. If one parameter is missing, it returns false. If you don’t specify a comparison type, the function performs a string comparison.