How to get paragraph field values? I'd like to create a product list in drupal and send it in a webservice.
For this I created an entity type with paragraphs for each product.
How can I load the paragraph and access its fields? Until now I see only the target_id and target_revision_id of the product. Thanks!

$nodestorage = \Drupal::entityManager()-&gt;getStorage('node');
$productslist = $nodestorage-&gt;loadUnchanged(9)-&gt;toArray();
foreach($productslist['field_products'] as $prod) {
  debug($prod);
}


Result:

Array
(
  [target_id] =&gt; 1
  [target_revision_id] =&gt; 3
)
You should be able to include the Paragraph entity class, and use Paragraph::load($entity_id) to load it.

Example:

use Drupal\paragraphs\Entity\Paragraph;

$paragraph = Paragraph::load($target_id);
$foo = $paragraph-&gt;field_name-&gt;value;