Я пытаюсь получить данные из Firebase в зависимости от позиции.Если я не знаю, каков ключ первого значения, как я могу получить доступ к значению первой позиции?
ticketCodes.addListenerForSingleValueEvent(new ValueEventListener() {
@Override
public void onDataChange(@NonNull DataSnapshot dataSnapshot) {
GenericTypeIndicator<List<String>> t = new GenericTypeIndicator<List<String>>() {};
List<String> yourStringArray = dataSnapshot.getValue(t);
// Here I want to receive the value of the first index in firebase without knowing what the key is.
//I am not able to. Though if I put "get(firstKey)" it gives me the value of the first index.
String value = yourStringArray.get(0);
Есть ли другой способ получить доступ кпервая позиция в этом списке?Моя база данных выглядит следующим образом:
