Announcement

Collapse

Mirth Connect 4.1.0 Released!

Mirth Connect 4.1.0 is now available as an appliance update and on our GitHub page. Mirth Connect 4.1.0 includes new features such as new event log messages, additional fields to the Welcome to Mirth Connect screen, new information included in alerts as well as many smaller changes, updates, and improvements. This release also contains several improvements to commercial extensions. 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