# Query MongoDb array field

**URL:** <https://community.dremio.com/t/query-mongodb-array-field/3770>\
**Category:** Uncategorized\
**Created:** [July 29, 2019, 11:17am UTC](https://community.dremio.com/t/query-mongodb-array-field/3770 "2019-07-29T11:17:32Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![m-prati](https://avatars.discourse-cdn.com/v4/letter/m/bb73d2/32.png) [@m-prati](https://community.dremio.com/u/m-prati)\
**Post date:** [July 29, 2019, 11:17am UTC](https://community.dremio.com/t/query-mongodb-array-field/3770/1 "2019-07-29T11:17:32Z")

</div>

I have a table from MongoDB document ‘Recipes’, with the property ‘Ingredients’ that is an array of maps:

```auto
[
   {"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:

```auto
select * from Recipes 
where Recipes.Ingredients[*].name = 'milk'

```

Can anyone help me?

---

<div class="post-metadata">

**Author:** ![vincent\_mayer](https://avatars.discourse-cdn.com/v4/letter/v/b9bd4f/32.png) [@vincent\_mayer](https://community.dremio.com/u/vincent_mayer)\
**Post date:** [April 5, 2023, 2:52pm UTC](https://community.dremio.com/t/query-mongodb-array-field/3770/2 "2023-04-05T14:52:10Z")

</div>

I have a similar problem. Can anyone help?
