Skip to content

Conversation

@sergeevik
Copy link

In js array may be object with key as index
some another fix:

  • remove generic in string method. replace with toString
  • applyInner check not null before use in matcher
  • check ? when arg type is operator by toString.equals (? is char in value)
  • 2 test for each partial expression

In js array may be object with key as index
some another fix:
- remove generic in string method. replace with toString
- applyInner check not null before use in matcher
- check ? when arg type is operator by toString.equals (? is char in value)
- 2 test for each partial expression
lhs = new HashMap();
for (int i = 0; i < tempLhs.size(); i++) {
((HashMap) lhs).put(i, tempLhs.get(i));
}
Copy link
Author

@sergeevik sergeevik Dec 16, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

maybe better:

var lhsNewMap =  new HashMap();
var lhsOldList = (List)lhs;
for (int i = 0; i < lhsOldList.size(); i++) {
  lhsNewMap.put(i, tempLhs.get(i));
}
lhs = lhsNewMap;

@uw4 uw4 self-assigned this Dec 18, 2025
@uw4 uw4 requested a review from aeberhart December 18, 2025 15:57
Copy link
Contributor

@uw4 uw4 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks + good catch!
We're reviewing this behavior of $each with list as input -
we want to clarify this with the original Jsonata maintainers, might be as well be a glitch in the original impl

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants