im new to mongoDb and despite querying i cannot successfully get the data I need using compass.
My document looks like this:

I want to see all candidates who are in the folder Pending. Candidates is an array and has roughly 200 objects within it.
Regards
try this:
https://mongoplayground.net/p/dmH6F5aiRXR
db.collection.aggregate([
{
$unwind: {
"path": "$candidates"
}
},
{
$match: {
"candidates.details.folder": {
$eq: "PENDING"
}
}
},
{
$replaceRoot: {
"newRoot": "$candidates"
}
}
])