Hello,
Sorry,This may be a silly question :
How to assign ajax return value to javascript array?
for example what I want is,
I have declared an array in javascript as
all_skills = new Array();
and after that called ajax call in which I want to save the return value of ajax (on success) to this declred array.
$.ajax({
url:'index.php?r=Skill_form/FetchAllSkills',
type:'POST',
data:name={},
success:function(data){
alert(data);
}
});
How to do this?
alert(data) gives me result as : ["test db skill 3","vv"]
i want to assign this array to all_skills