0👍
✅
You are trying to access branches[length] element which is not present. Do not try to access the array out of the bound element.
i < array.length
Correct way is as follows:
var branches = [{"Key":"QXdpYWthbmRhIEZvb2Rz","Name":"Awiakanda Foods"},{"Key":"VldDIExPR0lTVElDUw","Name":"VWC LOGISTICS"},{"Key":"RXllbWFzdGVycyBMaW1pdGVkIC0gRmVzdGFj","Name":"Eyemasters Limited - Festac"}];
for (let i = 0; i < this.branches.length; i++) {
var branch = this.branches[i];
console.log(branch);
console.log(branches[i].Key);
console.log(branch.Key);
}
Source:stackexchange.com