json to backbone model for load config-Collection of common programming errors
I want to set configs in Model with $.get() :
var config= Backbone.Model;
var c = new config();
$.get("config.json", function(data){
c.set(data);
});
console.log(c.get('glossary'));
Return Undefined, but console.log(c) return the good Backbone Model.
Content of JSON file is the example : http://www.json.org/example.html
Thanks
Originally posted 2013-11-09 23:30:09.