I have a content type with a field collection. This field collection has, as fields, other field collections. It works well, it groups the content for a node perfectly, but when trying to extract the data programmatically, I cannot access the values introduced. How would be the method. I tried with this piece of code, but it throws an error. Also not sure if adequate to my case (nested field collections):
$node = node_load($node->nid);
$node_wrapper = entity_metadata_wrapper('node', $node);
foreach ($node_wrapper->field_rich_text_group as $field_collection_wrapper) {
$field_collection = $field_collection_wrapper->value();
print_r($field_collection);
}