Hi,
I am trying to display list from the document JSON
https://developer.kore.ai/docs/bots/kore-web-sdk/message-templates/
all i get is that JSON is displayed back raw.
Examaple JSON (putting only element in JSON) below:
var message =
{
“type”: “template”,
“payload”: {
“template_type”: “list”,
“elements”: [
{
“title”: “Classic T-Shirt Collection”,
“image_url”: “https://peterssendreceiveapp.ngrok.io/img/collection.png”,
“subtitle”: “See all our colors”,
“default_action”: {
“type”: “web_url”,
“url”: “https://peterssendreceiveapp.ngrok.io/shop_collection”,
“messenger_extensions”: true,
“webview_height_ratio”: “tall”,
“fallback_url”: “https://peterssendreceiveapp.ngrok.io/”
},
“buttons”: [
{
“title”: “View”,
“type”: “web_url”,
“url”: “https://peterssendreceiveapp.ngrok.io/collection”,
“messenger_extensions”: true,
“webview_height_ratio”: “tall”,
“fallback_url”: “https://peterssendreceiveapp.ngrok.io/”
}
]
}
],
“buttons”: [
{
“title”: “View More”,
“type”: “postback”,
“payload”: “payload”
}
]
}
}
print(JSON.stringify(message));