This is what I’m trying just to see if it works, and I still get the error.
<script>
data = '{"type":"MESSAGE","data":{"topic":"channel-bitsevents.XXXXX","message":"{\"user_name\":\"TestUsername12345\",\"channel_name\":\"TestChannel12345\",\"user_id\":\"TestUserID12345\",\"channel_id\":\"TestChannelID12345\",\"time\":\"2017-06-3T12:00:00.000Z\",\"chat_message\":\"cheer1 Test message.\",\"bits_used\":1,\"total_bits_used\":1,\"context\":\"cheer\"}"}} ';
console.log(JSON.parse(data));
</script>