Paragraph how to get content level wise? Using module https://www.drupal.org/project/paragraphs.

On Admin side I have made content as a 3 level categories. Main Category, Sub Category, Sub Category.

Each category have their content as well.

On twig file when i print

{{ content }}


It display all data. Which is correct.

I need to fetch individual category &amp; their content &amp; do the styling for each.

How can i retrieve that each field in loop?
You can use this template file:

/themes/mytheme/templates/field--paragraph--field-category--faq.html.twig:

    &lt;div{{ attributes }}&gt;
        {% for item in items %}
            &lt;div{{ item.attributes }}&gt;{{ item.content }}&lt;/div&gt;
        {% endfor %}
    &lt;/div&gt;