{# templates/fieldtypes/show_json.html.twig #}

{% extends '@SonataAdmin/CRUD/base_show_field.html.twig' %}

{% block field %}
    {% set valarray = value|json_decode %}
        {# {{dump(valarray|raw)}} #}
    {# {{ value|json_decode|raw }} #}
    <p><em>( La ligne 1 est ignorée, elle contient le nom des colonnes )</em></p>
    {% for key, val in valarray %}
        <p><strong>Ligne {{key}}</strong></p>
        <ul>
            {% for key2, val2 in val %}
            <li>Colonne "{{key2}}" <ul><li>{{val2}}</li></ul></li>
            {% endfor %}
        </ul>
    {% endfor %}
{% endblock %}