title: How would I filter out sub documents?
body: <p>1) How can I grab all songs with more than 50 likes? The result set should return an array of songs instead of the whole document.</p>
  
  <p>2) How can I return the results of a specific song id instead of the whole document?</p>
  
  <p>So far I've come across this concept of <a href="https://jira.mongodb.org/browse/SERVER-142" rel="nofollow">virtual collections</a> for embedded objects. However, it hasn't been implemented since. Although, on the same link, someone suggests using the aggregation framework for such a thing. Is this a viable solution?</p>
  
  <p>I have the following document structure:</p>
  
  <pre><code>document = {
    'date' =&gt; Time.now.utc.strftime('%Y%m%d'),
    'songs' =&gt; {
      '1' =&gt; {
        'views' =&gt; {
          'non_uniques' =&gt; 2000,
          'uniques' =&gt; 203
        },
        'countries' =&gt; {
          'us' =&gt; 123,
          'uk' =&gt; 11
        },
        'likes' =&gt; 123,
        'comments' =&gt; 123
      },
      '2' =&gt; {
        'views' =&gt; {
          'non_uniques' =&gt; 2000,
          'uniques' =&gt; 203
        },
        'countries' =&gt; {
          'us' =&gt; 123,
          'uk' =&gt; 11
        },
        'likes' =&gt; 123,
        'comments' =&gt; 123
      }
    },
    'sign_ins' =&gt; {
      'non_uniques' =&gt; 2000,
      'uniques' =&gt; 203
    }
  }
  </code></pre>
  
  <p><strong>Expected output (as requested)</strong></p>
  
  <p>For question 1), somewhere within the lines of:</p>
  
  <p><code>['1' =&gt; {
            'views' =&gt; {
              'non_uniques' =&gt; 2000,
              'uniques' =&gt; 203
            },
            'countries' =&gt; {
              'us' =&gt; 123,
              'uk' =&gt; 11
            },
            'likes' =&gt; 123,
            'comments' =&gt; 123
          },
          '2' =&gt; {
            'views' =&gt; {
              'non_uniques' =&gt; 2000,
              'uniques' =&gt; 203
            },
            'countries' =&gt; {
              'us' =&gt; 123,
              'uk' =&gt; 11
            },
            'likes' =&gt; 123,
            'comments' =&gt; 123
          }]</code></p>
  
  <p>For 2):</p>
  
  <p><code>'1' =&gt; {
        'views' =&gt; {
          'non_uniques' =&gt; 2000,
          'uniques' =&gt; 203
        },
        'countries' =&gt; {
          'us' =&gt; 123,
          'uk' =&gt; 11
        },
        'likes' =&gt; 123,
        'comments' =&gt; 123
      }</code></p>