I want to get the value of the second index inside a document of the Firestore database. Currently, I am able to get the entire array but I couldn't get a value by its index.
This is the code I have which returns the entire value of the array .
firebaseFirestore.collection("levels").document("data").get()
.addOnCompleteListener(task -> {
if (task.isSuccessful()) {
ArrayList arrayList = (ArrayList) task.getResult().get("images");
// Here i am getting the entire data from the document
}
});