Yep, I'm new to the world of coding...

Quite a lot of experiences of databases so when I saw that there was an option for connecting content from a database to pages I was really glad.
Can some kind person help me over the threshold here…
If I have an database with quite a lot of different materials in one column, how can I get rid of all of the dublettes and only keep one of them in the table to show the visitor which different materials they can choose from?

The data looks like this
Quality Size Weight
Aluminium 1000x2500 50
Aluminium 1100x2500 55
Aluminium 1200x2500 60
Zink 1000x2500 50
Zink 1100x2500 55
Alloy 1000x2500 50
Alloy 1100x2500 55

And so on… I only want to show the data like this in the first table

Aluminium
Zink
Alloy

Regards

Danne

Hi,
You need to use query to get the items, then write a function to get only the unique items and show them in the table, you can look at this code for example to filter unique items:

let arr = results.items;
let unique_array = []
for(let i = 0;i < arr.length; i++){
   if(unique_array.indexOf(arr[i].field) === -1){
            unique_array.push(arr[i].field)
   }
}

Good luck :slight_smile: