I have successfully created an HTML table from JSON data and formatted it using JavaScript as required.
However, I am facing a challenge with right-aligning all the amounts coming from my JSON data. I want all the numbers to be aligned to the right but I'm unable to achieve that.
Below is my JavaScript code along with the JSON data:
var data = [
{
"amount": 476426,
"billdate": "2018-09-01",
"outlet": "JAYANAGAR"
},
// Other JSON data entries here...
];
// The rest of the JavaScript code for formatting the data and rendering the table goes here...
I am struggling to figure out how to align the numbers to the right, including the "Total" at the end which I also want to be bold.
For reference, you can view the fiddle here.