I am capturing var TRANSACTION_TYPE =msg['MSH'].['MSH.9'].['MSH.9.2'].toString();
Now I want to check if this value is not equal to A40, like
if ( TRANSACTION_TYPE!=='A40') {
--
--
}
But it is not working
Thanks
I am capturing var TRANSACTION_TYPE =msg['MSH'].['MSH.9'].['MSH.9.2'].toString();
Now I want to check if this value is not equal to A40, like
if ( TRANSACTION_TYPE!=='A40') {
--
--
}
But it is not working
Thanks
Seems like it should work. The !== is looking that the variable type is a string as well so that is something to look out for. An easy way to debug issues like this is using either the channelMap or logger.info() for debugging. So I'd advise these lines before your 'if':
logger.info('Debug: typeof(TRANSACTION_TYPE): ' + typeof(TRANSACTION_TYPE));
logger.info('Debug: TRANSACTION_TYPE: ' + TRANSACTION_TYPE);
logger.info('Debug: TRANSACTION_TYPE logic: ' + (TRANSACTION_TYPE !== 'A40'));