title: Backbone: Create collection from JSON
body: <p>I'm attempting to load JSON (from php's json_encode) into a Backbone JS collection.  I've simplified the problem to:</p>
  
  <pre><code>var myJSON = '[{ "id":"1","name":"some name","description":"hmmm"}]';
  
  var myCollection = new MyCollection(myJSON, { view: this });
  </code></pre>
  
  <p>And:</p>
  
  <pre><code>MyObject = Backbone.Model.extend({
  
    id: null,
    name: null,
    description: null
  });
  
  MyCollection = Backbone.Collection.extend({ 
  model: MyObject,
  initialize: function (models,options) { }
  });
  </code></pre>
  
  <p>Error: </p>
  
  <blockquote>
    <p>Uncaught TypeError: Cannot use 'in' operator to search for 'id' in</p>
  </blockquote>
  
  <p>Similar Issue:  <a href="https://stackoverflow.com/questions/5501562/backbone-fetch-collection-from-server">Backbone: fetch collection from server</a></p>
  
  <p>My JSON certainly appears to be in the right format, am I missing something obvious?  I have attempted using simply id: "1" as opposed to "id" with the same result.</p>