<p>All right, say I have this:</p>

<pre><code>&lt;select id='list'&gt;
    &lt;option value='1'&gt;Option A&lt;/option&gt;
    &lt;option value='2'&gt;Option B&lt;/option&gt;
    &lt;option value='3'&gt;Option C&lt;/option&gt;
&lt;/select&gt;
</code></pre>

<p>What would the selector look like if I wanted to get "Option B" when I have the value '2'?</p>

<p>Please note that this is not asking how to get the <em>selected</em> text value, but just any one of them, whether selected or not, depending on the value attribute. I tried:</p>

<pre><code>$("#list[value='2']").text();
</code></pre>

<p>But it is not working.</p>

It's looking for an element with id
```
list
```
which has a property
```
value
```
equal to
```
2
```
.
What you want is the
```
option
```
child of the
```
list
```
:
```
```
$("#list option[value='2']").text()
```
```