As I populate an array with objects, each iteration of the for loop updates the previous items in the array.
I've experimented with different types of loops such as for-each, for, and for-of.
var arrResult = new Array;
for (let element of accessoriesToDisplay) {
var obj = {};
var obj = await AdaptiveCardImporter.accessoryCard(element.Name,
element.Price, element.ProductDescription, element.URL, element.ImgURL);
arrResult.push(obj);
}
The final array should contain 3 distinct objects rather than just a repetition of the last one. Previously, this code functioned properly until I relocated the accessoryCard method from the main JavaScript file.
Watcher:
https://i.sstatic.net/TR1NW.png