web stats
Mirth Community - View Single Post - Remove 1 OBX line based on beginning text
View Single Post
  #9  
Old 09-02-2015, 08:39 AM
deuteronomy deuteronomy is offline
Mirth Newb
 
Join Date: Dec 2014
Posts: 22
deuteronomy is on a distinguished road
Default

I believe this does the trick

for (var i = 0; i <= msg.elements('OBX').length()-1; i++) {
msg.OBX[i]['OBX.1']['OBX.1.1'] = i+1;
if (msg.OBX[i]['OBX.2']['OBX.2.1'].toString() == 'ED')
delete msg.OBX[i--];
}
Reply With Quote