Filter Return of Meteor FindOne?
<p>How would I go about filtering the return of a FindOne function in Iron Router? I assume that aggregation is out of the question, but I may be wrong. I've tried many different ways that don't work. I'd like to return the id, name, and the season object that it finds a matching season_number in.</p>

<p>My database is setup like so:</p>

<ul>
<li>_id</li>
<li>name</li>
<li><p>seasons    (array)</p>

<ul>
<li><p>season (object)</p>

<ul>
<li><p>season_number</p></li>
<li><p>episodes (array)</p>

<ul>
<li><p>episode (object)</p>

<ul>
<li>episode_title</li>
<li>episode_number</li>
</ul></li>
</ul></li>
</ul></li>
</ul></li>
</ul>

<p>Here's my iron router code that is currently just running a findOne function.</p>

<p><div class="snippet" data-lang="js" data-hide="false">
<div class="snippet-code">
<pre class="snippet-code-js lang-js prettyprint-override"><code>Router.route('/show/:_id/season/:season_number', {
  name: 'viewSeasonPage', // This links to the template
  data: function() { return Tv.findOne({_id:"KQBXq4nri7zssDna2", "seasons.season_number": 2}))}
});   </code></pre>
</div>
</div>
</p>