title: Uncaught TypeError: Cannot read property 'type' of undefined with d3.js
body: <p>I've been stuck on this problem for hours at this point and I can't figure out the problem. </p>
  
  <p>I've been following <a href="http://bost.ocks.org/mike/map/" rel="nofollow">http://bost.ocks.org/mike/map/</a> with my own data set.</p>
  
  <p>The error: Uncaught TypeError: Cannot read property 'type' of undefined - topojson.v0.min.js:1</p>
  
  <pre><code>&lt;!DOCTYPE html&gt;
  &lt;head&gt;
  &lt;meta charset="utf-8"&gt;
  &lt;style&gt;
  
  path {
    fill: #ccc;
    stroke: #fff;
    stroke-width: .5px;
  }
  
  path:hover {
    fill: red;
  }
  
  &lt;/style&gt;
  &lt;/head&gt;
  &lt;body&gt;
  &lt;script src="../static/js/d3.min.js"&gt;&lt;/script&gt;
  &lt;script src="../static/js/topojson.v0.min.js"&gt;&lt;/script&gt;
  &lt;script&gt;
  
  
  var width = 900,
      height = 900;
  
  var path = d3.geo.path();
  
  var svg = d3.select("body").append("svg")
      .attr("width", width)
      .attr("height", height);
  
  
  d3.json("../static/json/newjerseymun.json", function(nj) {
    svg.append("path")
        .datum(topojson.object(nj, nj.objects.subunits))
        .attr("d", d3.geo.path().projection(d3.geo.mercator()));
  });
  
  &lt;/script&gt;
  
  &lt;/body&gt;
  </code></pre>
  
  <p>Here is a sample of the beginning of my json file: <a href="http://pastebin.com/g0Lut36V" rel="nofollow">http://pastebin.com/g0Lut36V</a></p>