Get the values of views fields in a Twig template I have created a view that outputs 3 fields for each row. Just using views, i can get the output to look something like this:

&lt;li&gt;[Field1 Value] [field2 value] [field3 value]&lt;/li&gt;


I have a requirement to set a data-attribute on the list items to on of the field values. Also, I want to wrap an anchor linking to the detail view of the content around all three field values.

I've tried using a twig template like views-view-fields.html.twig (too generic i know, but for testing purposes) but the values dont seem to be there. I can do {{ dump (fields|keys) }} and i see my fields there, but if i do {{ dump (fields.my_field|keys) }} then its just an empty array. 

I also tried using a template like page--[name of my page created by views].html.twig but couldn't seem to find the values for those fields there either. 

Any help on advice as to where I should be looking, particulary which twig templates I might create/override and how to get the values would be very much appreciated!
In the template file (views-view-field), you can use 

&lt;li&gt; {{ row._entity.field_name1.value }} {{ row._entity.field_name2.value }} {{ row._entity.field_name3.value }}&lt;/li&gt;


Or, in your theme, in the preprocess function you can overwrite the output:

function your_theme_name_preprocess_views_view_field(&amp;$variables) {
    $view = $variables['view'];
    if ($view-&gt;storage-&gt;id() == 'your_view_name') {
        $variables['output'] = '&lt;li&gt;' . 
          $variables['row']-&gt;_entity-&gt;field_name1-&gt;value . 
          $variables['row']-&gt;_entity-&gt;field_name2-&gt;value . 
          $variables['row']-&gt;_entity-&gt;field_name3-&gt;value . 
        '&lt;/li&gt;';
    }
}