I am trying to pass multiple parameters to the Inject JS activity by wrapping these in a JSON string and passing that to the function. However, I keep getting the error “‘JSON’ not defined”.
For some reason it does not recognise “JSON” but sees this as an undefined variable.
I’ve seen multiple examples on the web and in this forum that use the JSON object in scripts.
Do I need a reference somewhere or am I missing anything else?
My JSON string:
My JS script:
var jsonObj = JSON.parse(jsonString);
document.forms['myForm'].userName.value = jsonObj.userName; document.forms['myForm'].password.value = jsonObj.password; document.forms['myForm'].submit();
Thanks for any insights you can provide!