<Finding latest document from MongoDB collection u...
# stackoverflow
u
Finding latest document from MongoDB collection using Kotlin in Android Studio? I am a complete beginner with Kotlin and trying to learn MongoDB connections in Android Studio. I'm trying to find the latest entry in my mongodb collection named listingsAndReviews. This is how I instantiate the Client, Database and the Collection and findOne entry with the given query filter using Kotlin in Android Studio. val mongoClient = user!!.getMongoClient("mongodb-atlas") // service for MongoDB Atlas cluster containing custom user data val mongoDatabase =...