context put does not work correctly for path longer than 2
tomasherout opened this issue · 1 comments
tomasherout commented
Describe the bug
Function context put
does not work correctly for path longer than 2. For path with length 1 or 2 it works correctly - it merge object with value on given path. For path longer than 2 it returns object with last two keys from path without previous data from given object.
To Reproduce
context:
{"x": {"z": "old"} }
expression:
context put(x, ["a", "b", "c"], "new")
result:
{"b": {"c": "new"}}
=> Key a
is ignored and previous data {"z": "old"}
are also dropped.
Expected behavior
{"z": "old", "a": {"b": {"c": "new"}}}
Environment
- FEEL engine version: [1.17.3] on https://camunda.github.io/feel-scala/docs/playground/
saig0 commented
@tomasherout thank you for raising it. 👍 I can confirm the behavior. ✔️