Here i want to get WorkStatus of attendance from 0th index, but below code shows tha whole attendance array with multiple array of object. how i get attendance's single object{},from array of objects[]..
const abc = await Attendance.find({ "attendance.WorkStatus": "P" });
Output:
{
date: '2022-02-15',
attendance: [[Object], [Object], [Object],[Object], [Object], [Object],[Object],
],}