I have a csv string like this \"1,2,3\" and want to be able to remove a desired value from it.
For example if I want to remove the value: 2, the output string should
function process(csv,valueToDelete) { var tmp = ","+csv; tmp = tmp.replace(","+valueToDelete,""); if (tmp.substr(0,1) == ',') tmp = tmp.substr(1); return tmp; }