Plugin Author
berkux
(@berkux)
Hi,
try with the free version:
[jsoncontentimporter url=”https://json-content-importer.com/extra/json-examples/spordiregister-ee.json”%5D{nimi}
{subloop:sport:-1}{subloop:sport.spordiala_10:-1}{sport.spordiala_10.spordiala}{/subloop:sport.spordiala_10}{/subloop:sport}<hr>[/jsoncontentimporter]
or the pro version and twig:
{% for item in _context %}
{{ item.nimi }}: {{ item.aadress}}
{{item.sport.spordiala_10.spordiala}}
<hr>
{% endfor %}
Hi,
thank you for finding time for me. The thing is, spordiala_10 is not suitable for me, because it’s some kind of category mark for them. That means It shows only spordiala_10 values, not spordiala values what comes after it.
I try to explain to you, spordiala_10 is football, but there is a big list of sport organisations and I want to show what sports type every organisation is offering. So that means it shows only spordiala_10 sport type which is football. But there are also spordiala_28 for example which stands for bicycle sport. So that means the actual value comes in “spordiala” not in “spordiala_10” or any other “spordiala_NUMBER”.
So how to take “spordiala” not “spordiala_10”?
Plugin Author
berkux
(@berkux)
try
{% for item in _context %}
{{ item.nimi }}: {{ item.aadress}}
{% for itemsport in item.sport %}
{{itemsport.spordiala}}
{% endfor %}
<hr>
{% endfor %}
result should be like this:
http://wptest.kux.de/spordiregister-ee/
I am currently using free version, is it availible only in pro version?
Plugin Author
berkux
(@berkux)
Yes, the free version can’t handle this JSON as it requires fixed names of arrays.
the twig-templateengine can handle this, but twig is in the pro-version only.