table1
has a field string "value" and table2
has a field "value" as ObjectId
, Is it possible to do a query like this or how to write
table1.aggregate([
{
$lookup: {
from: "table2",
localField: "value",
foreignField: "_id",
as: "test"
}
}
])