Getting the container from the given structure using selector
<p>consider the following html structure:</p>

<pre><code>&lt;div&gt;
     &lt;div class="top"&gt;
        &lt;div id="id1"&gt;123&lt;/div&gt;
     &lt;div&gt;

     &lt;div class="top"&gt;
        &lt;div id="id2"&gt;123&lt;/div&gt;
     &lt;div&gt;
&lt;/div&gt;
</code></pre>

<p>Now I want to pick the container on the basis of class="top" and id="id2" in such a way that i get the container with class top. How can I do that? I would like to have some selector for that.</p>

<p>P.S: the id i am looking for is not necessarily to be an immediate parent of the class top.</p>
