How to access raw data in twig template using views table format I use a table format view to display a list of articles article-list using draggable views to allow editors to order the list. I customize the content of rows depending on a boolean field is_header and a formatted text field title_override. I have sub-themed views-view-table--article-list.html.twig to accomplish this. It works well enough.

In the template, I test the truth of is_header and the non-emptiness of title_override as follows:

    {% if row.columns.field_is_header|render|striptags|trim %}


and

    {% if row.columns.field_title_override|render|striptags|trim %}


These tests yield the proper results, but they make the template very slow! Anything less than render|striptags|trim doesn't work.

QUESTION:

Is there a way to directly access the raw data values of these variables to avoid the render|striptags|trim overhead?

I've seen suggestions to use something like row._entity.field_is_header, but this way of using _entity seems to work only in templates for the HTML or Unformatted view styles. Seems like there should be an easy way to do this.

As a note, switching to using an HTML or Unformatted style doesn't seem possible because AFAIK draggable views can be set up only with the table format.

ANSWER:

Thanks to 4k4 for the answer to this question (see below). To apply his/her general answer to my specific question, here is a snippet of the twig script I ended up with:

{% for key, row in rows %}
  {% if view.field.field_is_header.value(view.result[key]) %}
    &lt;conditional stuff&gt;
  {% endif %}
  {% if view.field.field_title_override.value(view.result[key]) %}
    &lt;stuff when the override is non-empty&gt;
  {% else %}
    &lt;stuff when the override is empty&gt;
  {% endif %}
{% endfor %}


Note that rows is an array normally passed to the views-view-table.html.twig template, as documented in the original template's header comments. Note also that the availability of the view array is NOT documented in the original template's header comments (not that it would have saved me without 4k4's help).
You can try to apply getValue() of the field handler on the result row, for example:

{% if view.field.field_name.value(view.result[key]) %}


Edit:

In a views table template row is not of the type ResultRow, so you need to get it directly from the view object using key of the loop {% for key, row in rows %}. 

See these questions for different views templates:
How can I get data from ResultRow object in views template and How to preprocess view field?