I’m trying to check if a product is in a collection named ‘company-1’ but it’s only finding it if it’s an exact match. There might be additional collections in the future so I’m trying to search on ‘company’ rather than the exact handle. What am I doing wrong?
{% assign productCollections = product.collections | map: ‘handle’ %}
{% if productCollections contains ‘company’ %} ← Does not find match
//Do something
{% if productCollections contains ‘company-1’ %} ← Match
//Do something