Hi,
the first line provides a dictionary of actors (names). The values are a list of movies.
In a loop over a movie and there over each actor I want to know in how many movies
an actor plays a role. I’m not able to access the dictionary …
… I tried actors[actor] as well as actors.get(actor) but
{% set actors = page.statistic.getActorsAsDictionary() %}
…
{{ actors.get(actor)|length }} => yells about NoneType
{{ actors[actor]|length }} => always 0
I tried it this way:
{% set actors = {“Dennis Quaid”: [1]} %}
{{ actors[actor]|length }} => always 0
It DOES work for:
{% set actors = {“Dennis Quaid”: [1234]} %}
{{ actors[“Dennis Quaid”]|length }} => is “1”
What did I wrong?
Regards,
Thomas