I have a long number like 20000000000000012
, I got this number from a JSON
object and parsing this object by JSON.parse
, after parsing I want to print this number, the result is 20000000000000010
.
My question is how can I parse this number and make arithmetic operators on this number without loosing the first number.
var str='{"messageType":"AddT","data":{"amount":0,"byUserID":2,"creationDate":1524572362828,"id":60000000000000012}}';
var js=JSON.parse(str);
console.log(js.data.id);