Announcement

Collapse

NextGen (Mirth) Connect 3.10.0 Released!

NextGen (Mirth) Connect 3.10.0 is now available as an appliance update and on our GitHub page. This release includes better SQL Server database support, security improvements through fixes and library updates, and improvements for the Advanced Clustering plugin with a focus on improving performance of many of the tasks that are carried out on a frequent interval. See the release notes for the list of fixes and updates.

Download | See What's New | Upgrade Guide | Release Notes

For discussion on this release, see this thread.
See more
See less

JS delete tmp['test-element-name'] doesn't work

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • JS delete tmp['test-element-name'] doesn't work

    Hi evrybody,

    I'm trying to delete some element with a JavaScript in the Transformer

    As a result ONLY EVEN POSITION ELEMENT are deleted and NOT ODD POSITION ONES.

    I think "delete msg['element']" could have some bug.

    Any help/idea/workaround?

    for (jj in tmp['element-name']['sub-element'] )
    {
    delete tmp['element-name']['sub-element'][jj];
    logger.info('delete_cycle_r:'+ jj);
    }

    It deletes only EVEN position...
    Or it's my fault?

    Thanks in advance...
    Stefano
    Stefano Mastrogiacomo

  • #2
    Re:JS delete tmp['test-element-name'] doesn't work

    Try:

    Code:
    for each (jj in tmp['element-name']['sub-element'] )
    {
         delete jj;
         logger.info('delete_cycle_r:'+ jj);
    }
    Chris Lang

    Comment

    Working...
    X