Bot_uttered response payload

I am using plain socket io web client.

widget_socket = io(“http://localhost:5005”, { reconnection: true, reconnectionDelay: 500, reconnectionAttempts: 10, });

widget_socket.on(“bot_uttered”, (botUttered) => { console.log(“RESONSE”); console.log(botUttered); });

i am receiving below response.

[“bot_uttered”,{“backgroundColor”:["#36a2eb","#ffcd56","#ff6384","#009688","#c45850"],“chartType”:“pie”,“chartsData”:[5,10,22,3],“displayLegend”:“true”,“labels”:[“Sick Leave”,“Casual Leave”,“Earned Leave”,“Flexi Leave”],“title”:“Leaves”}]

i am having domain.yml

utter_askLeaveBalance:

  • text: “here is your leave balance details” custom: payload: chart data: title: Leaves labels: - Sick Leave - Casual Leave - Earned Leave - Flexi Leave backgroundColor: - “#36a2eb” - “#ffcd56” - “#ff6384” - “#009688” - “#c45850” chartsData: - 5 - 10 - 22 - 3 chartType: pie displayLegend: ‘true’

how to get custom payload like
custom: payload: chart