Dataview query on an array

I have several recipes and their ingredients as metadata and would now like to use Dataview to query which recipe requires ingredient1. In the examples below the query should return file1 and file3. Can you help me?

the Metadata in file1 looks like:
ingredients: ingredient1, ingredient2, ingredient3

the Metadata in file2 looks like:
ingredients: ingredient2, ingredient3, ingredient4

the Metadata in file3 looks like:
ingredients: ingredient1, ingredient3, ingredient5

Does this work?

WHERE contains(ingredients, "ingredient1")
1 Like

Thank you very much, that works great and it is so easy. I looked for more than an hour …

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.