I tried a lot of possible things like:
{% if viewcounts %}
viewcount : {{ viewcounts.getName(data) }}
{% endif %}
or
{{ viewcounts|first }} -- this gives me the first, but I want the count of the page I'm visiting
{{ viewcounts(value) }} or {{ viewcounts(page.route) }} or {{ viewcounts(data) }} or {{ viewcounts.data }} ...
I tried the key (data) or the slug (page.route) or the value directly, but so far no luck.
Anybody a clue how to get the correct value for the page.route slug?
The data file is:
/: 28
/blog/sunshine-in-the-hills: 91
/blog/focus-and-blur: 48
The dump is:
{"\/":28,"\/blog\/sunshine-in-the-hills":91,"\/blog\/focus-and-blur":50,"\/blog\/london-industry":1,"\/blog\/classic-modern-architecture":1}