JavaScript
async connectedCallback() {
this.isLoaded=true;
await this.ScrollToTop();
let result = await getLocationwithKeys({});
this.LocationAllData =await this.filterCountData(result);
console.log('this.LocationAllData....' + JSON.stringify(this.LocationAllData));
this.isLoaded=false;
}
async filterCountData(result) {
for (let i = 0; i < result.length; i++) {
let count = 0;
if (result[i].VFD_Datas__r)
count = count + result[i].VFD_Datas__r.length;
if (result[i].Existing_Keys__r)
count = count + result[i].Existing_Keys__r.length;
if (result[i].Refrigeration_Data_Tables__r)
count = count + result[i].Refrigeration_Data_Tables__r.length;
if (result[i].Add_Sensors_Data__r)
count = count + result[i].Add_Sensors_Data__r.length;
result[i].count = count;
if(count>0){
result[i].showrecordy =true;
}
}
return result;
}
error is coming on count and showrecordy as i am adding into array how can i resolve it.