help calculating the sum of values in my columns to my table footer

Career:                  

I have used jquery to pull information from json file to generate my table. What I need to do now is write a syntax to calculate the sum of the values in the columns in my table in my tabel footer. Below is jquery syntax. I have tried different code but all have been null. $(document).ready(function() { // $.getJSON(url, callback); $.getJSON(‘https://api.myjson.com/bins/aruak’, function(json) { tableGenerator(’#tableName’, json); }); }); function tableGenerator(selector, data) { // data is an array var keys = Object.keys(Object.assign({}, …data));// Get the keys to make the header // Add header var head = ‘’; keys.forEach(function(key) { head += ‘’+key+’’; }); $(selector).append(head+’’); // Add body var body = ‘’; data.forEach(function(obj) { // For each row var row = ‘’; keys.forEach(function(key) { // For each column row += ‘’; if (obj.hasOwnProperty(key)) { // If the obj doesnt has a certain key, add a blank space. row += obj[key]; } row += ‘’; }); body += row+’’; }) $(selector).append(body+’’); }