acesario
5 years agoContributor II
Script Snap: TypeError: Cannot read property "Question_ID" from undefined
I have a script snap which uses javascript to transform/restructure the input data. When I do this by hard coding the input data, my script works fine. The data in my hardcoded variable is exactly w...
- 5 years ago
Hi @acesario,
The doc in the OK script is array, but it is not an array in the script that falls, so you cannot access the fields in the same way. Thus, if you want to get value of Question_ID you have to use the following doc.Question_ID, or in your case it will be:
result[doc.Question_ID] = doc.answerText;I’ve changed your script and after the changes the document in the output of the script is as follows:
Attached herewith is your pipeline with already implemented changes:
AC105 2_TESTer_2020_09_22.slp (30.1 KB)Regards,
Lazo