Referencing a paragraph field in a field--node template I need to reference field_role from a paragraph inside of a field--node template. The paragraph is an unlimited repeating field in the content type. The field template I am working with is the field in the content type which references the paragraph entity.

In the field template:

{% for item in items %}
  &lt;li&gt;
    &lt;a href="#"&gt;{{ paragraph.field_role }}&lt;/a&gt;
  &lt;/li&gt;
{% endfor %}


I've tried {{ content.field_role }} and {{ item.field_role }} as well.

Separately, I've also tried creating a preprocess hook for the field.

function theme_preprocess_field(&amp;$variables, $hook) {
  $paragraph = $variables['paragraph']-&gt;field_role-&gt;value;
  $variables['var_role'] = $paragraph;
}




function theme_preprocess_entity(&amp;$variables) {
  if ($variables['entity_type'] == 'paragraphs_item') {
    if(isset($variables['elements']['field_role']['#items'][0]['value'])){
      $variables['var_role'] = $variables['elements']['field_role']['#items'][0]['value'];
    }
  }
}


(I know this would only pull the first item from the repeating field, but I'm just trying to get anything to render at this point.)

How can I achieve what I am trying to do?
I was able to solve this by using the following in the field template:

{% for item in items %}
  {{ item.content['#paragraph'].field_role.0.value|striptags }}
{% endfor %}