I have two objects Chat and messages both in Realm database. I am fetching from db and getting two observables. Message object have chatId through which I can get chat object. chats() - gives Observable<[Chat> messages() - gives Observable<[Messages>
The problem is when I use map function on messages(), I get chatId, now I need chat array to filter the chatId and get chat object.
How can I do that? Can I combine both observables and get emitted both array in single closure. If yes, then how?