Alter drupal 8 views in for each row
After a long a research and development, I came to an conclusion that this could be the answer:

foreach ($view-&gt;result as $result) {
  $result-&gt;_entity-&gt;set('field_name', array(0 =&gt; 'value'));
}