15 lines
339 B
JavaScript
15 lines
339 B
JavaScript
|
function getPaliersTable(tableId){
|
||
|
let table = [];
|
||
|
$(`#${tableId} tr`).has('td').each(function () {
|
||
|
var arrayItem = {};
|
||
|
$('td', $(this)).each(function (index, item) {
|
||
|
if (index < 4){
|
||
|
let val = parseFloat($(item).html())
|
||
|
arrayItem[index] = !isNaN(val) ? val : null;
|
||
|
}
|
||
|
});
|
||
|
table.push(arrayItem);
|
||
|
});
|
||
|
return table
|
||
|
}
|