I have a string coming from database like Agree,don’t,partially,completely. without quotes. I have taken this in to a variable and I have splitted.
var x= Agree,Dont,Partially,completely;
var split = x.split(',');
but the code is not working then i have inserted the quotes to the string like.
var x = "\'" + answer coming from database + "\'";
var split = x.split(',');
Then the code works out but i get the ans as
x[0] = "Agree,x[1]=Dont ... x[3] = Completely"
My question is how can i split the value without appending the quotes to the x.
Hope you understand my question
Reagrds,
Sri
1 Answer