I am somewhat new to Firebase and looking for the ability to write multiple JSON objects into a collection under random IDs in one operation. I am just using firestore and auth(not shown) along with react.
So far I have
Function TestDocs () {
{addDoc(collection(db, 'randomData'), {**object 1 example data**},{**object 2 more example data**}
)
}
I have a button on a webpage which adds the data into the DB. When I check Firestore only the first object is loaded and not the second... on top of this, assuming that I wanted to add hundreds of objects(not just 2), how would I go about this?
I was looking through the documentation for Firestore batch writes but it only lists set(), update() and delete() as permitted operations so I am not sure how it would work. Thanks in advance