HELP: How to Properly filter duplicate items in a dropdown?

I’m struggling to fix the dropdown where I can’t able to see the items from my database that I created.
I exactly follow the tutorial from Code Queen on Youtube but I can’t make it work. I tried to create and connect my dropdowns in a dataset and “console.logged” all the possible area where the problem was but it’s all undefined. It’s been 2 days now and I have no idea how to fix it. So if anybody knew any effective solution for this I would greatly appreciate it!!
Collection Name: namecard
Dropdown 1: #material (onChange: material_change)
Dropdown 2: #lamination (onChange: lamination_change)
Both connected to dataset then dataset connected to namecard collection

import wixData from 'wix-data';
$w.onReady(function () {
    uniqueDropDown1();
});
function uniqueDropDown1 (){
    wixData.query("namecard")
        .limit(1000)
      .find()
      .then(results => {
 const uniqueTitles = getUniqueTitles(results.items);
           $w("#material").options = buildOptions(uniqueTitles);
      });
 function getUniqueTitles(items) {
 const titlesOnly = items.map(item => item.fieldkey);
         console.log(titlesOnly); //Test the array variable
 return [...new Set(titlesOnly)];
    }
 function buildOptions(uniqueList) {
 return uniqueList.map(curr => {
 return {label:curr, value:curr}; 
        });

    }

}
export function material_change(event, $w) {
uniqueDropDown2();
$w("#lamination").enable();
}
function uniqueDropDown2 (){
    wixData.query("namecard")
        .contains("fieldkey", $w("#material").value)
        .limit(1000)
      .find()
      .then(results => {
 const uniqueTitles = getUniqueTitles(results.items);
           $w("#lamination").options = buildOptions(uniqueTitles);
      });
 function getUniqueTitles(items) {
 const titlesOnly = items.map(item => item.fieldkey);
 return [...new Set(titlesOnly)];
    }
 function buildOptions(uniqueList) {
 return uniqueList.map(curr => {
 return {label:curr, value:curr};
        });
    }
}

How to Properly filter duplicate items in a dropdown?
Do you really have the dublicates in your DropDown? Or do you have them in your Database-Collection ?

This should help you out of your problematic situation…
https://russian-dima.wixsite.com/meinewebsite/test-test-test

Thanks for the feedback! I got duplicates on my database collection.

@mediafriend23
Could you solve your issue?

@russian-dima this is a bit complex for me. Do you have any simple one without user filtering?

@mediafriend23
Damn!

I think i forgot about you! SORRY !

When you do not get an answer, you never should give up and ask again, if you are really interessted into an answer.
I hope you could get your answer, but if not, take a look here…
https://www.media-junkie.com/databases

You will find a lot of informations here (also the info for UNIQUE-QUERIES).