How do I stringify objects or at least get a string value? The item.content for my field item is 'active'. However, when I use a comparison operator as seen below, it never equates to True but always False. I thought maybe some spacing issues was the reason, but that seems to not be the case.

Is the content in item.content not a string? I am assuming when I call item.content, its probably a object, but I can't find any documentation on how to turn a object's value into a string so it equates to true.  

{% for item in items %}
  {% if item.content == 'active' %}
    &lt;div{{ item.attributes.addClass('field__item', 'status_item_active') }}&gt;{{ item.content }}&lt;/div&gt;
  {% else %}
    &lt;div{{ item.attributes.addClass('field__item', 'status_item_notactive') }}&gt;{{ item.content }}&lt;/div&gt;
  {% endif %}
{% endfor %}
You can try this instead

{% if element['#items'][key].value == 'active' %}