I am trying to access the value in twig from:
But keep getting an error:
Impossible to access an attribute ("startDate") on a integer variable ("2").
And in my twig it's:
{% for item in data %}
...
{{ item.decoded.startDate }}
...
In Controller:
foreach ($data as $d) {
$d->decoded = json_decode($d->getValue());
}
Can somebody help skipping the error when the value is integer or null?