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
values is now an array. So instead of doing the traversing yourself.
Do:
var index = values.indexOf(value); if(index >= 0) { values.splice(index, 1); }
removing a single object from a given index.
hope this helps