Version: jsonata 2.2.2
Input:
JSONata:
/* correct, returns 1 */
a.b
/* broken, returns undefined */
a@$x.b
$x isn't even referenced in the second expression - merely attaching @$x to the a step causes the subsequent .b step to return undefined instead of navigating normally. Reproduces whether a is an object or an array, and whether the following step is a bare field name (.b) or wrapped in parens (.(b)).
Possibly related to #744 (array flattening changes when @ or # is used) - this looks like a more severe case of the same underlying issue, since here the value is lost entirely rather than reshaped.
Version: jsonata 2.2.2
Input:
JSONata:
$xisn't even referenced in the second expression - merely attaching@$xto theastep causes the subsequent.bstep to return undefined instead of navigating normally. Reproduces whetherais an object or an array, and whether the following step is a bare field name (.b) or wrapped in parens (.(b)).Possibly related to #744 (array flattening changes when @ or # is used) - this looks like a more severe case of the same underlying issue, since here the value is lost entirely rather than reshaped.