Get all tables with a particular Table Style applied
I want to process all tables in my InDesign document that have the "summary.product" Table Style applied. Currently, I am using the code below, which gets all of the table and then checks each with a loop. But I am wondering if there is a way to get them with a single line.
var tables, count, i;
tables = app.activeDocument.stories.everyItem ().tables.everyItem ().getElements ();
count = tables.length;
for (i = 0; i < count; i += 1) {
if (tables[i].appliedTableStyle.name === "summary.product") {
// Process the table.
}
}

