How do I retrieve values of a taxonomy field inside a field collection of a profile2 node? Can someone tell me how can I retrieve values of a taxonomy field inside a field collection of a profile2 node?

Thanks
You could try using entity_metadata_wrapper to load the profile2 entity.

You could then drill down to the field value on the field_collection.

Something like:


$profile = profile2_load_by_user($account, 'main');
// Use entity metadata wrapper, because it's awesome.
$profile_wrapper = entity_metadata_wrapper('profile2', $profile);
// We can access the term as the "value" of the field_collection child field
$term = $profile_wrapper-&gt;get('field_my_field_collection')-&gt;field_my_taxonomy_term-&gt;value();
// Just print out the term for now
drupal_set_message('&lt;pre&gt;'.var_export($term,1).'&lt;/pre&gt;');