Probably a stupid issue, but I am stuck.
I have a node.js server that sends data to a client, like this:
var message_to_client = result;
socket.send(JSON.stringify(message_to_client));
Client succesfully receives the data; if I log it on console, it reads like this:
[{"_id":"55e60d3de4b06ef3ed5f189e","par1":54.2441033, "par2":-10.177503399999999}]
I want to show the par1 value on screen, however I don't seem to be able to 'extract' it from the JSON response.
I tried with the parseJSON function from jQuery and with https://stackoverflow.com/a/22628619/3849735, neither worked.
Anyone can help? Thanks.