firestore batch add array

Solutions on MaxInterview for firestore batch add array by the best coders in the world

showing results for - "firestore batch add array"
Karsten
30 Jul 2017
1var db = firebase.firestore();
2var batch = db.batch()
3
4save(docs: any[]) {
5  docs.forEach((doc) => {
6    var docRef = db.collection("col").doc(); //automatically generate unique id
7    batch.set(docRef, doc);
8  });
9  return batch.commit();
10}
11
queries leading to this page
firebase firestore add multiple documentsfirebase insert documentupdate in firestorefirestore batch addbulk get refs from array firestorefirestore save multiple documents reacthow to add multiple docs to collection firebasefirebase add multiple documentsadd multiple docs to a collection in firebase 3fadd multiples firebase collection to arrayadd multiple doc to collection firebaseadd multiple documents to collection firestoreadd many docs firebasefirestore collection add multiple whereupdate multiplr firebase documents from javaadd multi collection android firebasehow to add documents with multiple collection in firebasehow to add multiple strings in firebase document using reactfirestore create multiple documentshow to add multiple in firestoefirestore add multiple documents to collectionfirestore batch add arrayfirebase best way to push multiple dokuments androidfirestore add multiple documentsfirebase doc add multilpefirestore insert multiple documentsreact add multiple docs to firestore collectioncloud firestore add multiple document of an useradd multiple documents to collection firestore androidfirestore add arrayadd multiple colection to upload data in firestore reactadd to all documents firebaseset multiple objects in the same document firestorehow to set multiple documents for a collection firestoreadd 2 colection to upload data in firestore reactupdate data firestore to sqlfirebase add multiple documents to collectionadd multiple docs to a collection in firebaseinsert multiple doc firebase into collectionfirebase collection multiple user oncefirestore batch add array