In JavaScript, both equality operators treat undefined as equal to itself:
undefined == undefined // true
undefined === undefined // true
However, in JSONata the following expression evaluates to false:
This behavior is surprising and may lead to unexpected results when comparing missing values.
Expected behavior
undefined = undefined should evaluate to true, or the documentation should clearly explain the rationale for the current behavior.
Actual behavior
The expression evaluates to false.
In JavaScript, both equality operators treat
undefinedas equal to itself:However, in JSONata the following expression evaluates to
false:This behavior is surprising and may lead to unexpected results when comparing missing values.
Expected behavior
undefined = undefinedshould evaluate totrue, or the documentation should clearly explain the rationale for the current behavior.Actual behavior
The expression evaluates to
false.