Hi there,
I'm trying to make a bulk update via primary key of tables on a view list. However, when I try to reference [i] within the query it (naturally) doesn't go through all of the arrays.

What would be the easiest way of creating a loop within this query? Apologies if it's quite straightforward.
I actually found the solution with a java query:
// Initialize an empty array to store the combined values
const combinedArray = [];
// Iterate over each object in table2
for (const key in table2) {
if (table2.hasOwnProperty(key)) {
const changesetArray = table2[key]?.changesetArray;
if (changesetArray && Array.isArray(changesetArray)) {
combinedArray.push(...changesetArray);
}
}
}
// Return the combined array
return combinedArray;
1 Like