Hello to all!
I have next project with aggregation:
.project({
'_id': 0,
'productId': 1,
'productName.fr' : 1,
'size': 1,
'brand': 1,
})
Question: how to set variable as filedName? Something like this?
.project({
'_id': 0,
'productId': 1,
`productName.*${lang}*` : 1,
'size': 1,
'brand': 1,
})
Any help is appreciated.