I have some strange porblem with jQuery. From a web socket I get the following JSON string:
{
"time" : 1373772581860,
"entries" : {
"OK" : 2,
"FASTER" : 1,
"SLOWER" : 2
},
"entriesSize" : 3,
"setEntries" : true,
"setTime" : true
}
After receiving it I would like to retrieve the values of entries so that I know how many votes OK has, how many FASTER and how many SLOWER. If I try this by saying msg.data.entries.FASTER
jQuery fails with TypeError: msg.data.entries is undefined
. Why is that. I tried it in JS Fiddle and it just worked fine. See here. Does anybody know why jQuery is acting that strange and different in different environments? Thanks.