only send/receive specific and updated value

8 views
Skip to first unread message

onie....@gmail.com

unread,
May 24, 2014, 12:14:46 PM5/24/14
to soc...@googlegroups.com
Hey folks,

How are you doing this ...

I'm making a SockJS nodejs server and client(browser) application. Let's say we have 3 different unrelated json data

json1
{ type : "scanner", brand : "hp", color : "beige" }

json2 
{ uid : 17, firstname : "Katie", age : 23, location : "Wisconsin"  }

json3
{ weather : "sunny", temperature : "60f" }


Now, I only would like to update json2 specifically location. I'd like to update it to "Illinois". What would be the code for that? I noticed that the first very simple chat code I wrote, sockjs doesn't care what string we send as long as it is string. I also learned just few minutes ago that in order to send json, I'll have to use JSON.stringify. I got this to work. However, I'm not sure how to update a specific value.

Any help would be greatly appreciated.

Thanks,

Neil
Reply all
Reply to author
Forward
0 new messages