children

A more Drupal way of getting the children of an element using the element_children method instead of simply stripping the hashes

In the php template you would do something like this.

<ul>
    <?php foreach(element_children($content['field_myfield']) as $key): ?>
    <li><?php print render($content['field_myfield'][$key]; ?></li>
    <?php endforeach; ?>
</ul>

You can loop on a render array with native twig, as it will render properties.

<ul>
    {% for element in children(content.field_myfield) %}
        <li>{{ element }}</li>
    {% endfor %}
</ul>