Get programmatically value of sub field collection item of a field collection I have a field collection

field library

and a sub field collection 

field book

which has a  field collection item field title.

to get the first field collection I use a wrapper:

$node_wrapper = entity_metadata_wrapper('node', $node);

foreach ($node_wrapper-&gt;field_library-&gt;value() as $key =&gt; 
$field_collection_wrapper) {
$ffp = $field_collection_wrapper-&gt;field_title[LANGUAGE_NONE][0]['value'];
}


but I need another for each inside the first foreach to get the item of the sub collection.
How should I do it?
I think this should be structured properly. It should give you access to each book on each library item.

$node_wrapper = entity_metadata_wrapper('node', $node);
$libraries = $node_wrapper-&gt;field_library-&gt;value();
foreach($libraries as $library){
  $library_wrapper = entity_metadata_wrapper('field_collection_item', $library);
  $books = $library_wrapper-&gt;field_book-&gt;value();
  foreach($books as $book){
    $book_wrapper = entity_metadata_wrapper('field_collection_item', $book);
    $title = $book_wrapper-&gt;field_title-&gt;value();
  }
}