Dropdown lists

hello!!!
I am developing a site and will need two dropdown menus (States and cities). I already linked the menus to a collection, the problem is I can’t manage to filter the images that are supposed to pop up when you choose a city (once you choose a state all of the photos from that state will appear).

All three photos belong to the same state, however, not from the same city.

So can someone please tell me what can I do? (I imagen it should be on the code). Thank you.

A few examples to get you started using setFilter and on change.
https://www.wix.com/corvid/reference/wix-dataset.Dataset.html#setFilter
https://www.wix.com/corvid/reference/$w.Dropdown.html#onChange

Examples.
https://m.youtube.com/watch?v=r0DLqkRDJ34
https://www.vorbly.com/Vorbly-Code/WIX-REPEATER-WITH-MULTIPLE-FILTERS

As for your dropdown, you can always do it like this if not connected to a repeater or table.
https://www.wix.com/corvid/example/cascading-form
Note that this example you can open in your own editor and see the code in the page tab and the public js file.

Or an example from Nayeli (Code Queen).
https://codequeen.wixsite.com/dropdown