Need help in string concatenation in React Native

I am making a expense Tracker app in which I want to upload my data to firebase , this is my code :

db.collection("methods")
        .doc(id)
        .update({
          addedName: [
            { Credit: [{ amt: 5, des: "Defualt" }] },
            { Debit: [{ amt: 5, des: "Defualt " }] },
          ],
        });

I want to use the value of the variable addedName while uploading

What errors do you get when you try it?

I have not tried FireStore before but from the docs it seems like it should support adding structured data like you are trying to do:

https://firebase.google.com/docs/firestore/manage-data/data-types
https://firebase.google.com/docs/firestore/manage-data/structure-data

This topic was automatically closed 20 days after the last reply. New replies are no longer allowed.