<% if (events.length > 0) { %> <% var event = _.find(events, function(event){ return event.url; }) %> <%= day %> <% } else { %> <%= day %> <% } %>