Select a DropDown by values with jquery
<pre><code>&lt;select id="id_deals-1-deal_template" name="deals-1-deal_template"&gt;
 &lt;option selected="selected" value=""&gt;---------&lt;/option&gt;
 &lt;option value="1" selected="selected"&gt;Pear&lt;/option&gt;
 &lt;option value="2"&gt;Apple&lt;/option&gt;
 &lt;option value="4"&gt;Melon&lt;/option&gt;
&lt;/select&gt;
</code></pre>

<p>In order to select Melon I have to do this:</p>

<pre><code>$('#id_deals-1-deal_template&gt;option:eq(3)').prop('selected', true);
</code></pre>

<p>But I would rather have to select the primary key that is 4 in this case.
Hence is it possible to select a dropdown by its value rather than sequence?</p>
