title: How to get a Firestore document ID based on its content?
body: <p>I am trying to get a way to delete firestore document by a click event. </p>
  
  <p>here is what i have so far. <code>x</code> is the document id i get from firestore. But how to get the ID change dynamically based on the content show in the page? SO that user can delete the content they wanted.</p>
  
  <pre><code>var deleteContent = document.getElementById('delete');
  deleteContent.addEventListener('click', function(e) {
      // get current document ID
  
      x = 'poOjcQce2iiKzp2FaFVA'
      var getId = db.collection("checkin").doc(x);
  
      getId.delete().then(function() {
          console.log(" successfully deleted!");
      }).catch(function(error) {
          console.error("Error removing document: ", error);
      });
  
  });
  </code></pre>
  
  <p>Thanks</p>