data= [{id:1, text:'abc'},{id:2, text:'cde'}]
In my template I want to do this:
<ul>
{{% for article in data %}}
<li><a href={{article.id}}>{{article.id}}</a></li>
</ul>
In click on li I would display only the property "text" of related id.
<div>{{selected article.text}}</div>
If clicked 1 I want to see "abc".
Is there a way to do it with twig?