How to use JSON in delivery directly without JS activity
Hi Team
I have a use case where
Schema Recipient has a attribute named JsonResponse (example below)
{
"employee": {
"name": "sonoo",
"salary": 56000,
"age": 30
}
}
I want to call employee.name directly within delivery without using JS activity in between, how can I achieve it ?
Solution I tried:
1. Created a workflow with JsonResponse as additional data
2. Inside delivery activity, I have added following
<% var test= JSON.parse(targetData.JsonResponse );
%>
Employee Name is : <%= test.employee.name%>
This way I am getting following error
Error while compiling script 'content htmlContent' line 5: #DOMAIN#. SCR-#ID# Javascript: error while evaluating script 'content htmlContent'.
Can someone help with this ?
Thanks