Need Help, I have problem Array Keep Empty After pushing object from forEach, do I miss something ? here's the code :
const allStatus = [];
    result.forEach(async (element) => {
      const count = await BpCandidate.count({
        where: {
          applicationStatusId: element.id
        },
        raw: true,
      });
      })  
      record = {
        id: element.id,
        name: element.name,
        code: element.code,
        description: element.description,
        total: count
      };
      allStatus.push(record);
    });
    console.log(allStatus);
Thanks in advance
 
     
     
    