How can i access every element value of my data.getReturnValue() because my c.getName is expectedly return a list of values.
({
myAction : function(component, event, helper) {
var getAllRelatedContact = component.get("c.getName");
getAllRelatedContact.setParams({
"textsearch" : component.find("textsearch").get("v.value")
});
getAllRelatedContact.setCallback(this, function(data){
var vals = data.getReturnValue();
for(integer i=0;i<vals.length;i++){
alert(vals[i]);
}
})
$A.enqueueAction(getAllRelatedContact);
}
})