Product page array repeater

let product;

 

$w.onReady(async function () {

 

product = await $w('#productData').getCurrentItem();

 

let AdditionalInfo = []

AdditionalInfo = product.additionalInfoSections;

AdditionalInfo.forEach((info, index) => {

//console.log(info.title)

//console.log(info.description)

info._id = "00000" + index.toString(); // Each item needs an ID

})

$w('#infoRepeater').data = AdditionalInfo; // Data needs to be an array

$w("#infoRepeater").onItemReady(($item, itemData) => {

console.log(itemData)

$item("#infoTitle").text = itemData.title;

$item("#infoDescription").html = itemData.description;

});

})

 

[

{

"_id": "1",

"firstName": "John",

"lastName": "Doe",

"image": "http://someImageUrl/john.jpg"

},

{

"_id": "2",

"firstName": "Jane",

"lastName": "Doe",

"image": "http://someImageUrl/jane.jpg"

}

]