title: Retrieving JSON from an external API with backbone
body: <p>I'm new to backbone.js and I've read other solutions to similar problems but still can't get my example to work. I have a basic rails api that is returning some JSON from the url below and I am trying to access in through a backbone.js front end. Since they are one different servers I think I need to use a 'jsonp' request. I'm currently doing this by overriding the sync function in my backbone collection. </p>
  
  <p>Api url:
  <a href="http://guarded-wave-4073.herokuapp.com/api/v1/plans.json" rel="nofollow">http://guarded-wave-4073.herokuapp.com/api/v1/plans.json</a></p>
  
  <pre><code>sync: function(method, model, options) {
      options.timeout = 10000;
      options.dataType = 'jsonp';
      options.url = 'http://guarded-wave-4073.herokuapp.com/api/v1/plans.json'
      return Backbone.sync(method, model, options);
  }
  </code></pre>
  
  <p>To test this I create a new 'plans' collection in my chrome console  using "plans = new Plans()" and then "plans.fetch()" to try and get the JSON.</p>
  
  <p>When I call plans.models afterwards I still have an empty array and the object that returns from plans.fetch() doesn't seem to have any json data included. </p>
  
  <p>Any ideas where I'm going wrong? </p>