How to delete the array elements at index in firestore in javascript

后端 未结 3 1499
面向向阳花
面向向阳花 2021-01-26 14:54
    var arr = [ \"GKRLrcpSL2BmKx3BfvWj\",\"fMwH404fweoFJJqyE5Nf\" , \"DTurwbw64CWw4WosUQtC\" ] //
arr.forEach((element) => {
    console.log(element);
    db.collecti         


        
3条回答
  •  后悔当初
    2021-01-26 15:22

    My solution is based on specifying the item ID to remove, example:

     firebase
            .firestore()
            .collection('projects')    // Collection
            .doc(project.id)           // ID string
            .delete()                  // Promise
    

提交回复
热议问题