How to display JSON.parse reviver?

edited January 11

Hi,

Am teaching myself and can receive data in the console with the following script. I am want to publish the JSON data to an HTML document.

code is:

var ws = new WebSocket('wss://ws.binaryws.com/websockets/v3?app_id=XXX');
ws.onopen = function(evt) {
   ws.send(JSON.stringify({ 
        "ticks_history": "frxGBPUSD","end": "latest","count": 86400,"style":"candles","granularity": 3600
    }));
}

ws.onmessage = function(msg) {
   var data = JSON.parse(msg.data); console.log('ticks_history update: %o', data)
}

JSON.parse() requires a reviver for this Can someone point me in the right direction please?

Many thanks...

Best Answer

Answers

  • Thank you, thank you, thank you.....perfect pointer....much appreciated. :D :smiley: B)

Sign In or Register to comment.