If I add the same data inside the same array in Firestore, it not creates more indexes in the array because it has the same data.
I want it to create more indexed when the same data is entered inside the array.
for example:
expected result:
code:
// collection reference
const collectionRef = collection(db, 'exercises data');
// submit function to add the exercises data
const handleSubmit = async (e) => {
e.preventDefault();
const usr = auth.currentUser;
await setDoc(doc(collectionRef, usr.uid), {
exercise: arrayUnion(exercise),
sets: arrayUnion(Number(sets)),
reps: arrayUnion(Number(reps)),
}, { merge: true })
}