Hello Yisrael. Thanks, but I already had tried it, and it return just a column. Take a look in my code:
wixData.query("Data")
.find()
.then((results) => {
const uniqueIdNumber= getuniqueIdNumber(results.items);
$w("#table2").rows = buildRows(uniqueIdNumber);
});
function getuniqueIdNumber(items) {
const idNumberOnly = items.map(item => item.idnumber);
return [...new Set(idNumberOnly )];
}
function buildRows(uniqueData) {
return uniqueData.map(curr => {
return {"name": curr, "city": curr, "idnumber": curr};
});
}
My table appears like that:
| NAME | REGION | CITY |
| 123 | 123 | 123 |
| 321 | 321 | 321 |
| 456 | 456 | 456 |
Please, help me. I just need it to conclude my work. Thanks.