Get the value of a field inside a paragraph field in hook_preprocess_field I'm usign the module Paragraphs for Drupal 8. I need to print the raw value of a paragraph field in the twig template, so I'm trying to access to the value of the field in the hook_preprocess_field, but I don't know how to access the value in $variables.

Any idea?
You can use preprocess field hook which is supported in drupal 8 also . Example below:

function example_preprocess_field(&amp;$variables) {
    if (($variables['element']['#field_name'] == 'example')) {
    //get the value of the field
    dsm($variables);
   print_r($variables);
    // add a class to the field        
    $variables['attributes']['class'] = [
     'example'
      ];
  }
}