Backend query, Remove duplicate from dropdown

Hi, I was wondering if someone would be able to help me with removing the ‘Any’ duplicates from my backend query?

Front End:

import wixData from 'wix-data';
import {populateDropdownFilter} from 'backend/utilitiesModule';

$w.onReady(async function () {
$w('#dropdown').options = await populateDropdownFilter('DropdownData', 'category', 'Grade', 'value')
    });

export function dropdown_change(event) {
    console.log($w('#dropdown').value)
}

Back End:

export function populateDropdownFilter(DropdownData, filteredField, filteredValue, valueField, ) {
 let allItems = [];
 return wixData.query(DropdownData)
        .eq(filteredField, filteredValue)
        .ascending('order')
        .find()
        .then((results) => {
 if (results.totalCount > 0) {
 let items = results.items;
                items.forEach((item) => {
 let any = {
                        label: 'Any',
                        value: ''
                    }
 let oneItem = {
                        label: item.title,
                        value: item[valueField].toString()
                    }
                    allItems.push(any, oneItem)
                })
 return allItems;
            }
 return null
        })
}

But I get the following

Thank you!

Have you seen the tutorial in the Corvid examples?
https://www.wix.com/corvid/forum/corvid-tips-and-updates/example-remove-duplicates-from-connected-dropdown-options-using-distinct-query

Hey @givemeawhisky I have seen this and can get this to work if i call this in the front end, I’m just trying to reduce code as I’ve had some complaints about the laggyness of the site… the code I have that works is this:

$w('#dropdownDifficulty').options = await populateDropdownFilter('DropdownData', 'category', 'Grade', 'value')
 let gradeOptions = $w("#dropdownDifficulty").options;
    gradeOptions.unshift({ 'value': '', 'label': 'All Grades' });
    $w("#dropdownDifficulty").options = gradeOptions;

But I have around 15 drop downs across the site and I thought I could try and manage this in the backend?