I'm trying to delete a single element of an Firestore array. The database has the following structure:
Unfortunately, with the following code nothing happens.
public static void deleteTable(final int pos){
FirebaseFirestore db = FirebaseFirestore.getInstance();
FirebaseAuth fAuth = FirebaseAuth.getInstance();
DocumentReference docRef = db.collection("users").document(fAuth.getUid().toString());
docRef.update("myTables", FieldValue.arrayRemove(pos));
}
It would be nice if someone could help me out with this one. I just want to delete one element out of the myTables array. (The elements are HashMaps)
Cheers Andi