wend try with this query, return the lookup is empty
db.getCollection(\'tests\').aggregate([
{$match: {typet:\'Req\'}},
{$project: {incharge:1}},
Your lookup Query is correct. But it is trying to compare a string type (incharge) with ObjectId (_id). Convert the string to ObjectId as shown below. It works for me.
db.getCollection('tests').aggregate([
{$match: {typet:'Req'}},
{$project: {
incharge:{
$toObjectId:"$incharge"
}
},
{$lookup:{
from: "users",
localField: "incharge", //this is the _id user from tests
foreignField: "_id", //this is the _id from users
as: "user"
}}