Change the value of a selection based on another attribute
<p>OK so i'm populating a selectbox with a JSON which looks something like this: </p>

<pre><code>Object{
"data":
[{"filter":"en","id":"2","label":"English"},
{"filter":"no","id":"3","label":"Norwegian"},
{"filter":"nl","id":"4","label":"Dutch"}]
}
</code></pre>

<p>Currently if i do jQuery("#mySelect").val() i get the value of "id" for the selected option and if i use the .text() or .html() i get the value of the selected label.
What i want to do is change the selected option based on the value of "filter", so for example i want to check if the option that is selected has the filter "no" and if it doesn't i want to select the option which does.</p>

<p>Any help would be appreciated.</p>
