JavaScript 'delete' does not seem to work in JavaScript processor


Userlevel 3

Issue:

Using the JavaScript 'delete' function in the JavaScript processor does not work. 

 

Cause:

This is due to the operation not being supported by the underlying Java script engine that is used to interpret and execute the JavaScript code. 

 

Workaround:

If possible, try to use the Java interop that is available.

For example, if one were using the JavaScript 'delete' function to remove a field in a record map, you could use the fact that the Java map API is accessible as part of the interop.

E.g.

delete records[i].value['/a'];

can be done as follows:

records[i].value.remove('delete_this_field');


0 replies

Be the first to reply!

Reply