I'm trying to update some data in my firestore database and the data inside is Map<String,List<String>>
in other words, a map of lists.
so when I'm trying to update a list inside the map, it casting the list to a map.
my code:
Calendar calendar = Calendar.getInstance();
String currentDate = DateFormat.getDateInstance().format(calendar.getTime());
DocumentReference docRef = db.collection("incomes").
document(firebaseAuth.getCurrentUser().getUid());
docRef.update(
index + ".0", incomeTitleEt.getText().toString(),
index + ".1", incomeAmountEt.getText().toString(),
Integer.toString(index)+".2",currentDate
).addOnCompleteListener(new OnCompleteListener<Void>() {
@Override
public void onComplete(@NonNull Task<Void> task) {
}
});