title: What is the best way to keep track of changes of a document's property in MongoDB?
body: <p>I would like to know how to keep track of the values of a document in MongoDB.</p>
  
  <p>It's a MongoDB Database with a Node and Express backend.</p>
  
  <p>Say I have a document, which is part of the Patients collection. </p>
  
  <pre><code>{
      "_id": "4k2lK49938d82kL",
      "firstName": "John",
      "objective": "Burn fat"
  }
  </code></pre>
  
  <p>Then I edit the "objective" property, so the document results like this:</p>
  
  <pre><code>{
      "_id": "4k2lK49938d82kL",
      "firstName": "John",
      "objective": "Gain muscle"
  }
  </code></pre>
  
  <p>What's the best/most efficient way to keep track of that change? In other words, I would like to know that the "objective" property had the value "Burn fat" in the past, and access it in the future. </p>
  
  <p>Thanks a lot!</p>