Drupal 8: How to retrieve field values when i use loadMultiple to load multiple node ids I am loading multiple node ids like below

$node_storage = \Drupal::entityTypeManager()-&gt;getStorage('user')-&gt;loadMultiple($nids);
foreach ($node_storage as $node){
  $value = $node-&gt;get('field_merchant_id')-&gt;value;
}


After this, I am getting an object and I don't know how to access my values. I have used get('field_name')-&gt;value but its saying Error: Call to a member function get() on array. How can I get an array that contains all values of one specific column from all nodes?
You should do like

$node_storage = \Drupal::entityTypeManager()-&gt;getStorage('node')-&gt;loadMultiple($nids);
foreach ($node_storage as $node){
   $field_merchant_id = $node-&gt;get('field_merchant_id')-&gt;value;
}


Here you are using "user" which should be replaced by "node" to access node values.
And also to access "field_merchant_id", you need to get that from $node.