I have an array with the following structure:
array(
'profile' => object(
'first-name' => 'Matthew'
),
'contact' => object(
'tel' => 0
)
)
How can I access that 'first-name' attribute using Volt? In PHP, whilst looping I would do the following:
$row['profile']->{'first-name'}
However that doesn't work in Volt. I have the following so far:
{% set profile = row['profile'] %}
{{ profile.{'first-name'} }}
But that is compiling as follows, changing curly braces to square:
<?=$profile->['first-name']?>