Display entries with matching checkbox field values I apologize if this question has been asked before. I'm new at this and am struggling to figure out if what I need to do is possible/the right way to do it or if I need to structure my content differently.

My entries in a section have a field that use a checkbox field type. I would like to display entries that have a matching value based on that field.

Example:
 Field: Vitamins,

  Field Type: Checkboxes
              Option: Vitamin A  | Value: a
              Option: Vitamin B  | Value: b
              Option: Vitamin C  | Value: c

Section: Vegetables

 -Entry: Broccoli
       Vitamins Field Values: a, c

 -Entry: Corn
       Vitamins Field Values: a, b

 -Entry: Squash
       Vitamins Field Values: a, b, c


I'm trying to figure out how to display all entries that contain Vitamin A.
After I posted my question I ended up coming with something that works:

 {% for entry in craft.entries.section('Vegetables') if entry.Vitamins.contains('a') %}
      &lt;p&gt;&lt;a href="{{ entry.url }}"&gt;{{ entry.title }}&lt;/a&gt;&lt;/p&gt;
 {% endfor %}