title: Uncaught TypeError: Cannot read property 'split' of undefined
body: <p>Using JavaScript to split a date and rearrange the format.</p>
  
  <p>Date is provided through a json feed as YYYY-MM-DD.</p>
  
  <p>To get the date, I do:</p>
  
  <pre><code>var og_date = (v.report[totalItems -1].inspection_date);
  console.log(og_date);
  </code></pre>
  
  <p>console log correctly shows the date, ie "2012-10-01".</p>
  
  <p>Next, I try to split the date, for example: </p>
  
  <pre><code>console.log(og_date.value.split('-'));
  </code></pre>
  
  <p>And I get:</p>
  
  <pre><code>Uncaught TypeError: Cannot read property 'split' of undefined 
  </code></pre>
  
  <p>Any ideas?</p>