Display pimcore object with twig

Hi,

I need some help with pimcore. The situation is simple, I want to display all data object with twig into a table. For the moment I can only display one data object in my table. I need a way to create a loop in order to display all object into my table.

this is the code:

{% block content %}

<section class="structures">
   {% for name in names %}
        <table class="table table-striped table-hover ">
            <thead>
            <tr>
                <th>Name</th>
                <th>Adress</th>
           
            </tr>
            </thead>
            <tbody>
            <tr>
                <td>{{  pimcore_object(id).name  }}</td>
                <td>{{  pimcore_object(id).adresse  }}</td>
            </tr>
            </tbody>
        </table>
    endfor
</section>

{%- endblock -%}

Hi,
pass the array of your objects in controller and then loop that array in twig.