per in my google sheet, per row has an information of say food, i would also want to show the image inside cell of each row but the only thing that is being shown in my table element was the name of food, amount, and other data. this is my code
import { getValuesFromGoogleSheet } from ‘backend/google-sheets’ ;
$w . onReady ( function () {
//will populate the table
const populateTable = **async** () => {
const data = **await** getValuesFromGoogleSheet ( "FoodSheet!A2:D14" );
const rows = data . data . values ;
const headers = rows [ 0 ];
let Formattedcolumns = [];
headers . forEach (( header ) => {
const column =
{
"id" : header ,
"dataPath" : header ,
"label" : header ,
"width" : 100 ,
"visible" : **true** ,
"type" : "string" ,
}
Formattedcolumns . push ( column );
})
// to insert item in every row skipping array[0] as it contains the header
let formattedRows = [];
**for** ( let i = 1 ; i < rows . length ; i ++) {
const row = {}
**for** ( let j = 0 ; j < headers . length ; j ++) {
row [ headers [ j ]] = rows [ i ][ j ];
}
formattedRows . push ( row );
}
//now implementing
$w ( "#foodTable" ). columns = Formattedcolumns ;
$w ( "#foodTable" ). rows = formattedRows ;
}
populateTable ();
})
this is what being shown, i would also like for image to show