idan
idan

Reputation: 2170

wix repeater not show the contect , bigquery result to repeater

I'm using this code to push the result to repeater, looks like the return data is ok but

async function executeQuery() {
  try {
    quryAletsBQ().then((results) => {
      results = results[0];
      $w("#repeater2").data = results
      console.log('Query Results:', results);

      // Iterate over each item in repeater2 and populate the fields
      $w("#repeater2").forEachItem(($item, itemData, index) => {

          console.log('insight_title:', itemData.insight_title);
          $item("#title").text = itemData;

       
      });

      // Set the data property of repeater2 to the results
      $w("#repeater2").data = results;
    });
  } catch (error) {
    console.error('Error executing query:', error);
  }
}

console.log('Query Results:', results) return

"Query Results: [{"_id":11111,"_createdDate":{"value":"2024-02-20T06:00:05.597Z"},"_updatedDate":{"value":"2024-02-20T06:00:05.597Z"},"_owner":"Idan","insight_title":"title","insight_type":"type","insight_short_description":"desciprtion","insight_metric":"metic","position_id":"position","insight_image":"https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcRQokBNVOKSBTESrYjVOsQVJFVEEGwdEynq_7KUnHI9GA&s"}]"

console.log('insight_title:', itemData)

return undefined

Upvotes: 0

Views: 60

Answers (0)

Related Questions