Recursion when reading field in hook_entity_load Is there a preferred approach modifying values?  

I need to modify a value when a node loads, but must use other values from the node.  The code below causes recursion errors.  

function zzzmodule_entity_load(array $entities, $entity_type_id) {

  foreach ($entities as $entity) {

    if ($entity_type_id === "node" &amp;&amp; $entity-&gt;hasField('other_field')) {


      $t = $entity-&gt;title-&gt;value;
      $o = $entity-&gt;other_field-&gt;value;

      if (empty($o)) {

        $o2 = json_encode($t);

        $entity-&gt;set('other_field', $o2);
        $entity-&gt;save();
      }

    }

  }

}
Your code works just remove the $entity-&gt;save(); and it works i have tested it:

function zzzmodule_entity_load(array $entities, $entity_type_id) {
  foreach ($entities as $entity) {
    if ($entity_type_id === "node" &amp;&amp; $entity-&gt;hasField('other_field')) {
      $t = $entity-&gt;title-&gt;value;
      $o = $entity-&gt;other_field-&gt;value;
      if (empty($o)) {
        $o2 = json_encode($t);
        $entity-&gt;set('other_field', $o2);
      }
    }
  }
}