i got following line
$('#formSelect option[value="'+ json.name + '"]').remove();
This deletes an option inside a form. Which option depends on json.name.
So do you know an alternative way to do this?
Maybe something in the form like this:
var rmOption = ???
$('#formSelect rmOption').remove();
You can try setting the options var and append it inside the selector like below,
Or you can do the iterate that jQuery would be doing internally,