I have a student schema which has a skills field i.e. an array of objects. for ex.
{
"badges": [],
"projects": [
"5ffaff96c7c6f43ec4e41e7e",
"5ffc55666ec0103e5cb18e93",
"5ffc562255c8545060088cff",
"5ffd58f2892e675118d4df5a"
],
"_id": "5ff9daf501a1e63674c20b58",
"owner": "5ff9da9eefb10a15f4f7bfe1",
"createdAt": "2021-01-09T16:33:57.721Z",
"updatedAt": "2021-01-13T09:07:08.339Z",
"__v": 0,
"github": "github",
"linkedin": "linkedin",
"twitter": "twitter",
"personalBlog": "blog",
"skills": [
{
"isActive": false,
"_id": "5ffeb83ce0b57a3eac2a490f",
"name": "HTML"
},
{
"isActive": true,
"_id": "5ffeb83ce0b57a3eac2a4910",
"name": "CSS"
},
{
"isActive": true,
"_id": "5ffeb83ce0b57a3eac2a4911",
"name": "CSS"
}
]
}
I want to filter out skills whose isActive fields are true. I tried each and every way but not able to find the solution. I want student schema + skills whose isActive are true