Upon executing the code provided below, I encounter the following error message.
An issue has arisen: Cannot find function contains in object Is Patient Fasting?/# of Hours->Yes; 12 hours.
Here is the snippet of my code:
var i = 0;
var tempFastingQuest = "";
var tempFastingAns = msg['OBR']['OBR.39'].toString();
while (msg['NTE'][i] != null) {
tempFastingQuest = msg['NTE'][i]['NTE.3']['NTE.3.1'].toString();
if (tempFastingQuest.contains("Yes"))
tempFastingAns = "Y";
i = i + 1
}
What is it that I am overlooking here?