I'm developing my own chatbot for messenger with Dialogflow v2 and the Node.js client SDK. But I've a problem with custom payloads. When I use the console provided by Dialogflow, I have a response which looks like this :
{ "payload": { "facebook": { "attachment": { "payload": { ...
But, when I get the response from my JS server, the custom payload has been serialized. Here is the object I receive :
{ facebook: { structValue: { fields: [Object] }, kind: 'structValue' } }
Is it possible to deserialize this object in order to get the same custom payload structure that I've provided in Dialogflow ?
Thank you in advance.