Return specific Matrix row? I'm looking to be able to return the info from a field(s) from a Matrix row where I know which row I want (long story). I had a guess at various ways of doing this, but in the end the only way that worked was to run the loop with an if statement to limit the output to a given row's id, e.g:

{% for block in entry.bodyRepeater %}
    {% if loop.index==2 %}
    &lt;h3&gt;{{ block.heading }}&lt;/h3&gt;
    {% endif %}
{% endfor %}


Guessing there might be a better way though?
This works but using this code can be a problem if you are dealing with a huge number of rows.

To access the n-th row, you can use:

{{ entry.blockRepeater.findElementAtOffset(n-1).heading }}


I found this method in the ElementCriteriaModel class. You can test if a certain row exists using entry.blockRepeater.offsetExists(n).