Hi,
It seems like the JSON you're getting back from the server puts your
items under a key called 'objects'. A Backbone Collection, by default,
if you just provide it a urlArg, will expect the server to return an
array / list of items.
It does, however, provide a parse method that you can over-ride to
parse the JSON you get from the server and return an array.
So, your Collection definition would look something like:
var orgColl=Backbone.Collection.extend({
model: org,
urlRoot: 'api/orgnanization/',
initialize:function(){
this.fetch();
console.log(this)
},
parse: function(response) {
return response.objects;
}
});
See:
http://backbonejs.org/#Collection-parse
All the best,
Sanjay