How can i convert select options elements to JSON text.
<select id="mySelect" multiple="multiple">
<option value="1">First</option>
<option value="2">Second</option>
<option value="3">Third</option>
<option value="4">Fourth</option>
</select>
I want to set options belong to select which is not runat=server to the
And I want to split string to array.
I’m not exactly sure what you mean. Do you mean you want something like this?
You can parse and stringify any object in Javascript with this. First you need to build up your object. You can do something like this:
Then use the stringifier to convert it into a JSON string.