title: Only checking if a certain property of a document has changed in cloud functions
body: <p>I want to be able to only execute the if statement, if the <em>done</em> (bool) property on the todo document changes, and not worry about the rest of the document. </p>
  
  <p>As the current issue that if a todo name is changed, this function gets called even though the done property has not changed.</p>
  
  <pre><code>exports.watchTodos = functions.firestore.document('users/{uid}/todos/{docId}')
      .onUpdate((snap, context) =&gt; {
  
          const data = snap.after.data();
          const isDone = data.done;           
  
          if (isDone === true) {
                console.log('add points')
          }
  </code></pre>