I have a select box with options, which its options' value are objects. Like this:
<select id="mySelect" name="mySelect">
<option value="{name: 'A', age: '20'}">A</option>
<option value="{name: 'B', age: '30'}">A</option>
<option value="{name: 'C', age: '40'}">A</option>
</select>
I need to know when I get an object like this, {name: 'B', age: '30'}
from api, how can I select the option which has this object as value in HTML?
In this case I want to second option be selected.