How to fetch data for multiple object values?

Hi! I am trying to get the last message for each user based on the room id(parent) but unfortunately I don’t understand how to pass a list of room id’s to the query and get the data. I succeeded in creating normal queries where you only need to assign one parameter,but when I need to retrieve data based on a list of parameters, is there a way I can do it? For ex:

const query = new Moralis.Query("Messages")

did you try query.containedIn ?

Hi! Thank you for the reply! Yes, I have tried and it seems to work perfectly based on what I’ve requested but the result is not the desired one. I’m considering another approach. Best regards!