Possible to filter an entry based on property? Trying to pull in a limit of 2 events that are upcoming (so the event's eventDate should be newer than today). I currently have this: 

{% set entries = craft.entries.section('events').order('eventDate asc') %}
{% set today = now|date('Y-m-d') %} 

{% for event in entries %}
  {% if today &lt;= event.eventDate %}
    &lt;!-- markup here --&gt;
  {% endif %}
{% endfor %}


However, this returns all events that are upcoming. I would like to only limit it to 2. The problem when I put the .limit(2) on my for loop is that it chooses the first two (and those happen to be older events). Do I need to do another loop within the if statement and add .limit(2) to that or is there a better way?

Thanks!
This should work below. Rather than querying all entries and looping through, just select the entries you need (ie. now) and limit them. 

{% set upcomingEvents = craft.entries.section('events').eventDate('&gt;= '~now).limit(2) %}
{% for event in upcomingEvents %}
    &lt;!-- markup here --&gt;
{% endfor %}