This content has been marked as final. Show 5 replies
XPath indexes are 1-based rather than 0-based in Java and most other languages. So perhaps that is the only problem you're facing in the first part of your question.
The append rather than overwrite behaviour is strange - not quite sure whether it's intended for some reason, or it's a bug. We can confirm that we see the same behaviour.
What we do is if we want to assign, we clear the original list first - you can do this with our CollectionUtils component.
More info here:
A way to completly empty a list or map is by using a ExecuteScript object and place the following code in it:
Thank you all for the pointer and information...
ES 8.2 will have a new function to empty map and list objects
The default behaviour when adding values to a list is to append the values to the list.
If you want to replace a value, you need to identify the index of the item to replace, for example /process_data/listVar
Here's the help topic about accessing data in lists and maps: