With a little help from my son we found a solution:
const data = filterContracts.data;
const results = [];
for (let i = 0; i < data.length; i++) {
const row = data[i];
const isValid = await is_Valid_Alert_Date(
row.Notice_date,
ReadAlertSettings.data[0].Alert_period
);
if (isValid.data) {
results.push(row);
}
}
return results;
Maybe there is a better one, but this one works!