This is the code, all variables exist in this but it says can only use await on async functions:
fetch(“https://api.onfinance.in/insights”, requestOptions)
.then(response => response.text())
.then((result) => {
for(let j=0; j<checkedDataIDS.length; j++){
await table.deleteRecordAsync(checkedDataIDSaj]);
}
console.log("Processed Insights: ", checkedDataIDS);
})
.catch(error => console.log(‘error’, error));