I have a table from MongoDB document ‘Recipes’, with the property ‘Ingredients’ that is an array of maps:
[
{"name": "milk", "qta": 1, "um": "litre"},
{"name": "chocolate", "qta": 200, "um": "gr"},
...
]
How can I get all recipes with ‘milk’?
I’ve tried with the solution above, but it doesn’t work:
select * from Recipes
where Recipes.Ingredients[*].name = 'milk'
Can anyone help me?