Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
({
doInit : function(component, event, helper) {
var action = component.get("c.fetchMapData");
action.setCallback(this, function(response) {
var state = response.getState();
if (state === "SUCCESS") {
var custs = [];
var conts = response.getReturnValue();
for(var key in conts){
custs.push({value:conts[key], key:key}); //Here we are creating the list to show on UI.
}
component.set("v.oppAccountList ",custs);
}
});
$A.enqueueAction(action);
}
})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment