I would like to display my numbers in a specific column in the currency format with the number rounded to the nearest whole number (no decimals).
Here is the code for my Bootstrap table: http://jsfiddle.net/bypbqboe/28/
Here is a sample of my JSON data from my Fusion Table:
[{
"0":"<a href =\"http://www.kia.com/us/en/vehicle/optima/2015/experience?cid=sem&ppc=y&story=hello\" target=\"_blank\">Kia Optima LX</a>",
"1":"95",
"2":"$182.95",
"3":22515,
"4":17629,
"5":595,
"6":0.55,
"7":12383.250000000002,
"8":0.00069,
"9":"36",
"10":"12,000",
"11":"Luxury",
"12":"Large",
"13":"",
"14":""
},
...
I want "7":12383.250000000002
(my Residual ($) column) to display as $12383.
I attempted to use .toFixed()
in line 15-17:
for (var p=0; p<global_data.length; p++){
global_data[p].7 = global_data[p].7.toFixed(1);
}
but it doesn't work.:/ I am new to programming. Your help will be much appreciated!