How to fetch the field data in computed field In  my content type i have range field which have two value from and to. i would like to print the from value only through the computed field.The object array looks like this

[object array]
  [field_range]
     [und]
      [0]
       [from]
       [to]


I tried to fetch the form value by using below piece of code but i am not able to get result. Please anyone guide me to achieve this.

$field_items = field_get_items($entity_type, $entity, 'field_range');
$drilldata = $field_items['und']['0']['value'];
$entity_field[0]['value'] = $drilldata-&gt;from;
field_get_items() takes care of language negotiation for you, so the field value is one level up. e.g.

$field_items = field_get_items($entity_type, $entity, 'field_range');
if (!empty($field_items[0])) {
  $data = $field_items[0]['value']-&gt;from;
}