How to output only the first instance of a Matrix block type field I've got a Matrix block in my Latest News/Index template and I can't figure out how to only output the first instance of a block type field.
Here is my code, working great except it outputs the first 250 characters from ALL {{block.newsContent}} content block fields not just the first. I know this is what my code is actually set up to do, but I can't figure out how to only output the first one!

{% for block in entry.newsBlock %}
    {% switch block.type %}

        {% case 'nbTitle' %}

            &lt;a href="{{ entry.url }}"&gt; &lt;h2&gt; {{ block.newsTitle }} &lt;/h2&gt;&lt;/a&gt;

            &lt;h3&gt;{{ entry.postDate | date("d-M-Y") }}&lt;/h3&gt;


        {% case 'nbContent' %}

            &lt;div class="news-content-index"&gt;
                &lt;p&gt;{{ block.newsContent | striptags | slice(0, 250) ~ '...' }}&lt;/p&gt;
            &lt;/div&gt;

    {% endswitch %}
{% endfor %}


The {{block.newsContent}} part outputs every instance of that field, but I only need the first, as it's the 'excerpt' intro to the complete article.

Here is the front end:
https://www.ancamotion.com/latest-news

Any help appreciated, thanks!
You can either use external bool variable

{% set firstNbContentDisplayed = false %}
{% for block in entry.newsBlock %}
    {% switch block.type %}
        {% case 'nbTitle' %}
            ...
        {% case 'nbContent' %}
            {% if not firstNbContentDisplayed %} 
                {% set firstNbContentDisplayed = true %}
                ...
            {% endif %}
    {% endswitch %}
{% endfor %}


or if possible in your case separate nbContent and limit it to 1

{% for block in entry.newsBlock %}
    {% switch block.type %}
        {% case 'nbTitle' %}
            ...
    {% endswitch %}
{% endfor %}

{% for block in entry.newsBlock.type('nbContent').limit(1) %}
    ...
{% endfor %}