Followed a couple of the tutorials on here and got through most hurdles setting up a web module and getting my JSON data to appear in the console. The repeater is also clearly recognizing the data because it populates the correct number of items. My issue is the item data itself does not populate.
Page is live at www.iccara.com/specials
Any help would be appreciated.
$w.onReady(function () {
getSpecials()
.then(json => {
console.log(json);
var specialData = json
let items = specialData.data;
let specials = [];
items.forEach(function (item) {
let special = { "_id": item.barcode, "title": item.name, "description": item.description, "image6": item.image };
specials.push(special);
});
// To cause the onItemReady() event handler to trigger, we clear the data property
// so that when we assign the new recipes to the data property, all of the recipes
// are considered new recipes and not just updated recipes.
$w("#repeater1").data = []; // clear the repeater contents
$w("#repeater1").data = specials; // add the recipes to the repeater
$w('#repeater1').show(); // repeater hidden until data has been retrieved
});
});