I have a CSV values of list box options in a string, how do I parse value and text separately from it?
Here is my string:
[<option value="Employee_OID">Portal EID</option>, <option value="EmpID">Emp ID</option>, <option value="Employee_Name">Name</option>]
If that’s your whole string, you can remove the outside brackets, then split on the comma to get an array of elements. You can then turn them into jQuery objects in a loop and get the value/text (You can also do it using regular JS)
http://jsfiddle.net/wirey00/W2dUb/
As @Kevin stated, you can use regex also