Hi, I try to use in aggreagation lookup stage “from”: “$colName”, but it doesn’t work
Any suggestion will be help …
{
"$match": {
"_id": new ObjectID("651aff11fa62127802083116")
}
},
{
"$project": {
"colName": "col",
"constantId": "$meta.constantId"
}
},
{
"$lookup": {
"from": "$colName", // doesn't work
"from": "col", // work
"localField": "constantId",
"foreignField": "facilityConstantId",
"as": "array"
}
}