Mongo query for field name
<p>I have a collection that summarizes some data related to documents in other collections. It's structure is roughly like:</p>

<pre><code>{
    campaignId : ObjectId(...)
    impressions : {
        ...
        '2016-09-20': 1800,
        '2016-09-21': 1500,
        '2016-09-22': 2000
    },
    clicks : {
        ...
        '2016-09-20': 60,
        '2016-09-21': 55,
        '2016-09-22': 80
    }
}
</code></pre>

<p>I realize there are better ways of doing it, but it's something I can't control.</p>

<p>The issue is that I need to <strong>query for documents that had impressions in the previous 7 days</strong>.</p>

<p>So I need to query based on the field key instead of the value.</p>

<p>Is it possible doing this in a query?</p>