Dark Lord
Dark Lord

Reputation: 425

JSON Parser Nodejs giving undefined error

I am getting the following string when I try to JSON.parse the string, I get the following error

undefined:1
{"device":"FaclonTest","data":[{"tag":"LATITUDE","value":1903.5091},{"tag":"LONGITUDE","value":07251.0348}]}

Where am I going wrong, can someone help?

Upvotes: 1

Views: 154

Answers (1)

Ivan Vasiljevic
Ivan Vasiljevic

Reputation: 5708

You have a problem with "value":07251.0348. Number should not begin with 0. If you remove that leading zero, everything should start working. So try to change "value":07251.0348 to "value":7251.0348

Upvotes: 3

Related Questions