How to get nid and title from a node array use Drupal\node\Entity\Node;

function abc($v) {
  $node = \Drupal\node\Entity\Node::load($v);
  print_r($node);
}


The array structure of $node is as given below


Drupal\node\Entity\Node Object (
[in_preview] =&gt; 

[values:protected] =&gt; Array
    (


   [nid] =&gt; Array
        (
            [x-default] =&gt; 166
        )

    [vid] =&gt; Array
        (
            [x-default] =&gt; 180
        )

    [type] =&gt; Array
        (
            [x-default] =&gt; sections
        )

    [uuid] =&gt; Array
        (
            [x-default] =&gt; 7759efc9-cfff-4d58-b392-8d60b9903323
        )

    [langcode] =&gt; Array
        (
            [x-default] =&gt; en
        )
As mentioned in the comment of @Hudri Node is an object not an array.

In Drupal 8 there are two ways to get the value of a field.


$node-&gt;field_name-&gt;value 
$node-&gt;get("field_name")-&gt;getValue()


In your case you can get the nid and title like below:

$nid = $node-&gt;id();
$title = $node-&gt;label();


or

$title = $node-&gt;getTitle();


To read about objected-oriented programming conventions In Drupal 8 check this blog article: Drupal 8 API: objected-oriented programming conventions.