Hi i am trying to handle an ajax json response
here is my code
success: function (j) { switch(true) { case (j.choice1):
In a case like this, a better way to do this is probably something like:
success: function (j) { if(j.choice1 || j.choice2) { alert("choice2"); } else { alert("default"); } }