firestore save a score as a number not a string in js
.... db.collection('users').doc(user.uid).collection('items').doc('manual').collection('transactions').add({ amount: createForm.amount.Value, name: createForm.name.value, category: createForm.category.value, date: createForm.date.value, userUID: user.uid }) ....
Here is what the above code is Doing:
1. We’re getting the user’s UID from the user object.
2. We’re creating a reference to the user’s document in the users collection.
3. We’re creating a reference to the user’s document in the items collection.
4. We’re creating a reference to the user’s document in the transactions collection.
5. We’re adding a new document to the transactions collection.