I have a question. I have a scenario where I need to get value of option tag based on option text.
<select>
<option value="0">zero</option>
<option value="1">one</option>
<option value="2">two</option>
<option value="3">three</option>
</select>
Here imagine that I want to get the value "2" based on the supplied text "two". How can we achieve that?