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.
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:
expression:
result:
=> Key
a
is ignored and previous data{"z": "old"}
are also dropped.Expected behavior
Environment