Programmatically update node via array I'm trying to import some nodes into a new D8 installation. Therefore I wrote a module. Importing nodes is already working perfectly.
As you can see in my code snippet, I'm using the $field_array variable to create the nodes. 
Now my questione: is it possible to use this variable also for the node update functionality?

Regards 

M.

 public function ausgabe($import_node,$action,$new_old_uid,$new_old_nid) {
    global $content_type;


    $lang = $this-&gt;get_current_language();

    $field_array = [
        'uid' =&gt; $new_old_uid["new_uid"],
        'type' =&gt; $content_type,
        'langcode' =&gt; $lang,
        'status' =&gt; $import_node-&gt;status,
        'created' =&gt; $import_node-&gt;created ,
        'changed' =&gt; $import_node-&gt;changed ,
        'title' =&gt; $import_node-&gt;title,
        'body' =&gt; [
            'summary' =&gt; "",
            'value' =&gt; (isset($import_node-&gt;body) &amp;&amp; !empty($import_node-&gt;body)) ? $import_node-&gt;body : "",
            'format' =&gt; 'full_html',
        ],
        'field_teaser' =&gt; [
            'value' =&gt; (isset($import_node-&gt;teaser) &amp;&amp; !empty($import_node-&gt;teaser)) ? $import_node-&gt;teaser : "",
            'format' =&gt; 'full_html',
        ],
        'field_onid' =&gt; array('value'=&gt;$import_node-&gt;nid),
        'field_image' =&gt;  $this-&gt;get_set_images($import_node-&gt;field_ausgabe_bild),
        'field_files' =&gt; $this-&gt;get_set_files($import_node-&gt;files),
    ];

    if($action == "create") {
        $node = Node::create($field_array);
    } else {
        $node = Node::load($new_old_nid["new_nid"]);

    }
    $node-&gt;save();

    \Drupal::service('path.alias_storage')-&gt;save("/node/" . $node-&gt;id(), '/'.$import_node-&gt;path, $lang);
    echo $action.": Node " . $import_node-&gt;title . ' ('.$node-&gt;id().') &lt;br&gt;';

    $this-&gt;pre("",true);

}
There seems to be no method to update a complete node.

But you can do this on a field basis:

foreach ($field_array as $field =&gt; $values) {
  $node-&gt;set($field, $values);
}