I have list of account Ids in an array and list of accounts in array.
I need to find the account Ids from the account list and want to change the status field.
var accId=[]; //holding accIds
var accObjectMap = [];
var accList=component.get("v.listOfacc");
console.log('sa##'+accList);
for(var i=0; i<accList.length; i++) {
console.log('acceee##'+accList[i].Name);
var temp = { "key": accList[i].Id, "list": [accList[i]] };
console.log('temp##'+temp);
accObjectMap.push(temp);
}
for(var j=0;j<accId.length;j++){
console.log('accId##'+accId[j]);
}
Eg : My accId have 2 account ids .My accList have 6 values. I want to find that 2 values from acclist and assign the status as "New".