I am loading multiple node ids like below
$node_storage = \Drupal::entityTypeManager()->getStorage('user')->loadMultiple($nids);
foreach ($node_storage as $node){
$value = $node->get('field_merchant_id')->value;
}
After this, I am getting an object and I don't know how to access my values. I have used get('field_name')->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?