dropdown with not "used" items only

HI i stucked again with one problem. There is many dropdowns on forum but i need dropdown which takes values from query i made. I have reapetor with chairs and want to put names of people to this chairs and on change save it. But when i sit someone i dont want to see him again in dropdown. So i have query to give me not sitted persons. But query gives me many results with many columns. I would like only “imie” in dropdown. I will write when i manage to solve it entire code because i couldnt find code for such dropdown which gives me not unique values but not “used” values. I was trying to many codes from forum but alweys something was wrong.

My funncion give such results

getnotSitted()
.then(results => {
console.log(results);

0:
“{"_id":"743cc88e-0789-4eb9-91ea-52d1a32ac02e","miejsce":103,"_owner":"5c4794ca-8ac7-4193-9e61-6bf81eb53307","_createdDate":"2018-12-05T16:54:20.584Z","_updatedDate":"2018-12-05T18:40:19.744Z","imie":"aga zielska"}”

my code i tried is like here but nothing shows up in dropdown

$w.onReady( function () {

uniqueDropDown1(); 

})

function uniqueDropDown1 (){

getEmptyRooms() 
  .then(results => { 

//console.log(results)
//console.log (“rrrrrrrrrrrrrrrrrrrrrrrrrrrrrr”)
const uniqueTitles = getUniqueTitles(results.items);

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

  }); 

function getUniqueTitles(items) {

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

return [… new Set(titlesOnly)];

} 

function buildOptions(uniqueList) {

return uniqueList.map(curr => {

return {label:curr, value:curr};

    }); 

} 

}

Hey
Please add the code for getEmptyRooms() so I can see all of the code to find what is wrong.

this function is taken from different purposes but it workes here. I have collesion table (stol) and collesion guest. It compares stol with guest and gives me free “chairs”. It workes because i see in console.log. You are contributor to my website and can see inside if needed Chris

function getEmptyRooms() {
// Get list of occupied rooms (we return a Promise so that the calling function can
// process the results
return getOccupiedRooms()
.then((occupiedRoomList) => {
let emptyRoomQuery = wixData.query(“listagosci”);
// loop through occupied rooms creating a list of queries to exclude occupied rooms
for ( let i = 0 ; i < occupiedRoomList.length; i++) {
// Get a record to exclude
let occupiedRoomRecord = occupiedRoomList[i];
let exclusionQuery = wixData.query(“listagosci”)
.eq(“_id”, occupiedRoomRecord.gosc);
emptyRoomQuery = emptyRoomQuery.not(exclusionQuery);
}
// We have built our Empty Room Query - now execute it
return emptyRoomQuery
// .ascending(“sortowanie”)

    .find(); 
}) 
.then((results) => { 

return Promise.resolve(results.items);
});
}

let user = wixUsers.currentUser;
let userId = user.id;

function getOccupiedRooms() {

return wixData.query(“stoly”)
.eq(“_owner”, userId)
.isNotEmpty(“_owner”)
.isNotEmpty(“gosc”)

 .find() 
.then((result) => { 
 console.log("zzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz") 
   console.log(result)  

// Return a promise with the array of occupied rooms
return Promise.resolve(result.items);

      }    ) 

}