var st = '{"total":2.47E-7}'
var b = JSON.parse(st);
How can I convert exponential value to decimal here using JS
var st = '{"total":2.47E-7}'
var b = JSON.parse(st);
How can I convert exponential value to decimal here using JS
try this example
the result is itself if undefined comes
var st = '{"total":2.47E-7}'
var b = JSON.parse(st);
console.log(b.total);
var lastDigit = b.total.toString().split('-')[1] ;
console.log(b.total.toFixed(parseInt(lastDigit) + 3))