Closed developper89 closed 8 years ago
if the callback argument is an ack how do we parse it to js object ? socketIO.on('login', function (data) { console.log("LoginSuccess: ", data); <= ack }) i would like to access data properties like: console.log("LoginSuccess: ", data.username);
socketIO.on('login', function (data) { console.log("LoginSuccess: ", data); <= ack })
console.log("LoginSuccess: ", data.username);
got it working using data[0]
if the callback argument is an ack how do we parse it to js object ?
socketIO.on('login', function (data) { console.log("LoginSuccess: ", data); <= ack })
i would like to access data properties like:console.log("LoginSuccess: ", data.username);