We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 7079d88 + 375c9ce commit efbb3beCopy full SHA for efbb3be
1 file changed
src/modules/food/food.service.ts
@@ -106,11 +106,17 @@ export class FoodService extends DB {
106
in: {
107
id_ingredient: '$$ingredient.id_ingredient',
108
quantity: '$$ingredient.quantity',
109
+ suppPrice: {
110
+ $arrayElemAt: [
111
+ '$ingredients.price',
112
+ '$$ingredient.id_ingredient',
113
+ ],
114
+ },
115
name: {
116
$arrayElemAt: [
117
'$ingredients.name',
118
'$$ingredient.id_ingredient',
- ], // Assuming 'ingredients' is the array of ingredients
119
120
},
121
122
0 commit comments