[nodejs] How do you extract values from the JSON data receiving

2012-07-07 Thread Ket
Hi I have this code when I send message: var msg = { name: userName, text: ABCD }; var json = JSON.stringify({ type:'message', data: msg }); socket.send(json); And here the code that receives the message: socket.addEventListener(message, function(event) { console.log

Re: [nodejs] How do you extract values from the JSON data receiving

2012-07-07 Thread Dominic Tarr
var msg = JSON.parse(json) On Sat, Jul 7, 2012 at 7:08 PM, Ket kettin...@gmail.com wrote: Hi I have this code when I send message: var msg = { name: userName, text: ABCD }; var json = JSON.stringify({ type:'message', data: msg }); socket.send(json); And here the code

Re: [nodejs] How do you extract values from the JSON data receiving

2012-07-07 Thread Ket
Thanks, I get it done. -- Job Board: http://jobs.nodejs.org/ Posting guidelines: https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines You received this message because you are subscribed to the Google Groups nodejs group. To post to this group, send email to