I am trying to fetch an object:
$field_name= 'field_test';
$json_code = $node->$field_name['und'][0]['value'];
NOT WORKING
$json_code = $node->field_test['und'][0]['value'];
WORKING
I must have variable because it's every time different field name
any solution?
$var = $node->$field_name; $json = $var['und'][0]['value'];