So let's say I have the following code. I have the data to retrieve the entry I want, But I only want to return some of the matrix rows based on some criteria.
Example Code:
{% set entryId = 1 %}
{% set entry = craft.entries({ section: "mySection", id: entryId }).first() %}
{% set myMatrixOutput = entry.myMatrixField.find({ someFieldInTheMatix: 2 }) %}
{% for row in myMatrixOutput %}
{{ row.someFieldInTheMatrix }}
{% endfor %}
I can't get that to work it simply return me everything. I know that I could adjust my loop to be
{% for row in myMatrixOutput if row.someFieldInTheMatix == 2 %}
But say I have a large number of rows in the matrix field it would seem a waste to do all that looping if it could just bring back the correct results?