Sort Dataset - Outdated information everywhere

I have a collection with over 7000 records in it. Using a cascading dropdown from this tutorial https://codequeen.wixsite.com/dropdown .

All the info online just says to ‘sort in your data set properties’ which I don’t have showing anywhere.

I need to sort dropdown1: A-Z, as well as dropdown2 : A-Z. This is the code that I’m using to pull directly from the dataset:

import wixData from ‘wix-data’ ;

$w.onReady( function () {

uniqueDropDown1(); 

});

function uniqueDropDown1 (){

wixData.query( "HospitalName" ) 

    .limit( 1000 ) 

  .find() 

  .then(results => { 

const uniqueTitles = getUniqueTitles(results.items);

       $w( "#dropdown1" ).options = buildOptions(uniqueTitles); 

  }); 

function getUniqueTitles(items) {

const titlesOnly = items.map(item => item.state);

return [… new Set(titlesOnly)];

} 

function buildOptions(uniqueList) {

return uniqueList.map(curr => {

return {label:curr, value:curr};

    }); 

} 

}

export function dropdown1_change(event, $w) {

uniqueDropDown2();

$w( “#dropdown2” ).enable();

}

function uniqueDropDown2 (){

wixData.query( "HospitalName" ) 

    .contains( "state" , $w( "#dropdown1" ).value) 

    .limit( 1000 ) 

  .find() 

  .then(results => { 

const uniqueTitles = getUniqueTitles(results.items);

       $w( "#dropdown2" ).options = buildOptions(uniqueTitles); 

  }); 

function getUniqueTitles(items) {

const titlesOnly = items.map(item => item.title);

return [… new Set(titlesOnly)];

} 

function buildOptions(uniqueList) {

return uniqueList.map(curr => {

return {label:curr, value:curr};

    }); 

} 

}