Reputation: 11295
{% set key = 'something' %}
My array
has key something, I and can it access array['something']
, but when I try to use variable in key like:
array[key]
I'm getting error that array key not exist. So question is how to access array keys using variables.
Upvotes: 3
Views: 2500