How to Fetching data from Mongodb using jetpack compose with kotlin language?

Hello everyone!

I have managed to connect a kotlin project made in jetpack compose to mongodatabase and can performe CRUD operations.

I am trying to fetch data stored in monogdatabase using jetpack compose and kotlin languages. For simplification, lets say I have 10 users. 2 of 10 users has the age of 18. My age on the app is 18. When I click a button on the screen, I want a pop up to appear saying “You have matched with 2 people”.

How can this be done using mongoDb as a backend database and kotlin language in jetpack compose? Appreciate any feedback or advice!

Appreciate any feedback and guidance! Obs - if code is needed I can update the question with my current code!