Hi
facing a problem here.....
my "!=" operator is not working
this is my code:-
for each(obr in msg.OBR)
{
if(obr['OBR.4']['OBR.4.1'].toString() == '24222-8')
{
for each(obx in msg.OBX)
{
for(var i = 0; i<msg['OBX']['OBX.3'].length(); i++)
{
if(msg['OBX'][i]['OBX.3']['OBX.3.1'].toString() != '4321-6' || msg['OBX'][i] ['OBX.3']['OBX.3.1'].toString() != '4321-4')
{
delete msg['OBX'][i];
}
}
}
}
}
Even though ['OBX.3.1'] is not equal to the given value, it goes into the condition and deletes the corresponding OBX segment.
Can anyone please help me with that?????
facing a problem here.....
my "!=" operator is not working
this is my code:-
for each(obr in msg.OBR)
{
if(obr['OBR.4']['OBR.4.1'].toString() == '24222-8')
{
for each(obx in msg.OBX)
{
for(var i = 0; i<msg['OBX']['OBX.3'].length(); i++)
{
if(msg['OBX'][i]['OBX.3']['OBX.3.1'].toString() != '4321-6' || msg['OBX'][i] ['OBX.3']['OBX.3.1'].toString() != '4321-4')
{
delete msg['OBX'][i];
}
}
}
}
}
Even though ['OBX.3.1'] is not equal to the given value, it goes into the condition and deletes the corresponding OBX segment.
Can anyone please help me with that?????
Comment