I'm fairly new to Javascript trying to access some data from a table I've created using footable. It should be simple but I can't seem to get it to work.
So far I can drill down to the table's rows using table.rows
, which is returns a class. Within that class is an 'all' array which I'm trying to access. In the example, I'm following table_variable.rows.all
works, but for me, the result returned is 'undefined'.
What is the correct way to access this array from the class? I've tried other ways such as:
table_variable.rows['all']
but none seem to have worked.
Many thanks
EDIT - more code:
I'm creating the table here and later passing the variable to the totals function:
ft = FooTable.init('#showcase-example-1')
function totals(ft)
{
console.log(ft);
console.log(ft.rows);
console.log(ft.rows.all);
}
The error is on the ft.rows.all
line saying 'undefined'.