Je was er bijna, je had alleen de juiste $match
vraag die volgt:
ubBike.aggregate([
{ "$match": { "cust": req.query._id } },
{
"$lookup": {
"from": "appos",
"localField": "_id",
"foreignField": "bike",
"as": "appointments"
}
},
{ "$match": { "appointments.status": { "$ne": "Booked" } } }
]).exec(function(err, bikes){
if(err) throw err;
res.send(bikes);
});