title: Fill missing dates in json string with jquery/javascript
body: <p>Here's a sample of what I have:</p>
  
  <pre class="lang-js prettyprint-override"><code>[{
    "probeTemp": "35.40",
    "dateProbe": "2015-08-1"
  }, {
    "probeTemp": "34.89",
    "dateProbe": "2015-08-3"
  }, {
    "probeTemp": "34.42",
    "dateProbe": "2015-08-5"
  }]
  </code></pre>
  
  <p>How can I fill the missing dates between the min and max dates in the json string so the missing fields end up like this?</p>
  
  <pre class="lang-js prettyprint-override"><code>    [{
        "probeTemp": "35.40",
        "dateProbe": "2015-08-1"
      }, {
        "probeTemp": null,
        "dateProbe": "2015-08-2"
      }, {
        "probeTemp": "34.89",
        "dateProbe": "2015-08-3"
      }, {
        "probeTemp": null,
        "dateProbe": "2015-08-4"
      }, {
        "probeTemp": "34.42",
        "dateProbe": "2015-08-5"
      }]
  </code></pre>
  
  <p>I found <a href="https://stackoverflow.com/questions/16956063/javascript-function-to-check-for-missing-dates-on-json-object">this thread</a>, but I don't know how I could apply it to my data. Any help?</p>
  
  <p>Edit 2: <a href="https://pastebin.com/tA3jMFg6" rel="nofollow noreferrer">This is what I tried so far</a>, but I'm getting <code>Uncaught TypeError: Cannot read property 'length' of undefined</code> at lines 7 and 23.</p>