All I need to do is "loop" through FT1 and add a value to a null field. Below is my code. The code does not create any errors, but looks like it just skips the step. Any suggestions?
for (var x=0; x<msg['FT1'].length(); x++ ) {
var coding_system = msg['FT1'][x]['FT1.19']['FT1.19.3'].toString();
}
if (coding_system.length > 0){
msg['FT1'][x]['FT1.19']['FT1.19.3'] = 'ICD10CM';
}
for (var x=0; x<msg['FT1'].length(); x++ ) {
var coding_system = msg['FT1'][x]['FT1.19']['FT1.19.3'].toString();
}
if (coding_system.length > 0){
msg['FT1'][x]['FT1.19']['FT1.19.3'] = 'ICD10CM';
}
Comment