How can I load a JSON file from the local filesystem into a javascript object?
Something similar to jQuery:
$.getJSON( \"ajax/test.json\", function( data
As answered in the official forums, you can make a call to cc.loader.loadJson:
cc.loader.loadJson
cc.loader.loadJson("res/example.json", function(error, data){ cc.log(data); //data is the json object });
The function that you pass as parameter will be called back when the file finishes loading.