Copy link to clipboard
Copied
Suppose I have a table. I can do this:
var cells = resolve(table.columns.everyItem().cells.everyItem().toSpecifier());
This gives me every cell in the table.
But what if I wanted it as an array of arrays of cells? That is, an array, where each element is the array of cells in that column. Is such a thing possible?
Copy link to clipboard
Copied
There's no need to use resolve and toSpecifier, it's a (costly) way of doing
var cells = table.columns.everyItem().cells.everyItem();
As to creating an array of arrays the way you're after, I thought that that was possible, but it no longer works. Maybe my memory is faulty, but now it seems that the only way to create an array of arrays fro table rows is to do it 'manually':
cells = [];
rows = table.rows.everyItem().getElements()
for (i = 0; i < rows.length; i++) {
cells.push (rows[i].cells.everyItem().getElements();
}