Using Entity Metadata Wrapper
Submitted by amitsedai on Tue, 11/26/2013 - 13:10The Entity API provides wrapper classes you may use to make dealing with the values of an entities properties and fields easier. Wrappers make it easier to get and set the values of fields and properties as well as to programmatically retrieve additional information about these elements and iterate over lists of values in a consistent manner.
This implies that one need not worry about fetching a node property in the format:
$node->field_name['und'][0]['value']