byBy this way: as per this https://www.drupal.org/node/1477202#comment-6040026post:
/**
* Implementation of hook_node_presave.
*/
function mymodule_node_presave($node) {
if ($node -> type == 'my_type') {
$field_field_collection = field_get_items('node', $node, 'field_field_collection');
foreach ($field_field_collection as $key => $value) {
$fc_wrapper = entity_metadata_wrapper('field_collection_item', $value['entity']);
$fc_name = $fc_wrapper -> field_field_collection_name -> value();
dsm($fc_name);
}
}
}
See: Understanding Field Collection Values and Entity metadata wrappers pages.