title: Checking Firestore property value before updating
body: <p>The problem i can't seem to solve is:</p>
  
  <p>I want to update a the value of a property in one of my collections lets say i have  a collection "posts" and all the documents have a property(field) of votes which buy default is 1 and i want to update by one by every click.</p>
  
  <p>collection       doc          fields</p>
  
  <p>posts            id1          votes: 1</p>
  
  <p>Updating the value is would look something like this:</p>
  
  <pre><code>  addVote(id){
      this.postCollection.doc(id).update({
        votes: 2
      })
    }
  </code></pre>
  
  <p>But how would I go about if I first want to check the the value of the property and then increase it by one for each click, the firebase documentation isn't much help.</p>