'How to get Object field from array of objects
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],
],}
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
