How to return to the image of what is selected in the dropdown?

I need some help!
in this case I’m populating the dropdown, okay.
My problem is that I need to display the image referring to what is selected in the dropdowm, but it returns me the image of the first item, in this case the index [0].
How do I search the image of what is selected in the dropdown?
.
import wixData from ‘wix-data’;
export function BTCOMBINADOS_click(event) {
let opcoes = new Array()
wixData.query(“MENU_PRATOS”)
.find()
.then(function(resultado){
$w(’ #image2 ').src = resultado.items[0].novoCampo //I do not know how to proceed here
resultado.items.forEach(function(value, index){
opcoes.push({“label”:value.pratos, “value”:value.pratos})
})
})
.then(()=> {
$w(" #dropdown1 ").options = opcoes
})
}

Hello

First you need to get the value of the dropdown and then query the images collection based on this value :

let image = $w('#dropdown2').value
wixData.query("MENU_PRATOS")
    .eq("image title field", image)
    .find()
    .then((resultado) => {
        $w('#image2').src = resultado.items[0].novoCampo // assuming that's the field with the source value
    })

Best
Massa