You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Ok, with some help from the slack channel I think I have a better understanding of this behavior.
$.a[1]
should be written as
($.a)[1]
to get the second element.
and these:
items.a[0] and items.a[0][0][0][0][0]
are equivalent to
$.(a[0]) and $.(((a[0])[0])[0])[0]
So it is a matter of precedence where the right most index is applied first in the case of direct array access. This is different from filtering results where the precedence starts at the left most bracket. I'm not sure that makes sense to me at this point, but at least I understand how it works.
Hello - first of all, thank you for making JSONata, it's absolutely excellent.
I've noticed an issue which seems to be a bug (reproducible in both JSONata 1.7.0 and 1.8.6, tested in https://try.jsonata.org/ explorer).
Steps to reproduce:
Link: https://try.jsonata.org/7kapj6UKN
"item"
field.Expected result:
$map
ping over two items should produce two items at the output.Actual result:
Notes:
[1,2,3]
) an array obtained as a result of JSONata expression is used (e.g.Order.Products
)$map
expression is not assigned to a field inside of an object, for a following JSONata expression:The result is:
which is to be expected.
The text was updated successfully, but these errors were encountered: