Explode values from one column (MongoDB)

I tried to make a charts with my data, b

I want filtered by categories with just one value. But Metabase return all the combinaison with this value. How create one pie chart (for example) with distribution of A, B, C, D, for the "snack".

I use a json database.

Thanks guys

Sorry, which database you use? MongoDB or a relational database with a JSON field?

I use MongoDB (I create my collection on VSCode)

ok, so try using a native mongo query with a function to unwind that array

Thank you, I'm going to try it, but I'm not sure how to do that..

Check in the Mongodb documentation