我有这个:
get_json = (url) ->
$.getJSON "#{url}.json", {}, (json, response) ->
return json
但这编译为:
getJson = function(url) {
return $.getJSON("" + url + ".json", {}, function(json, response) {
return json;
});
};
..并返回响应对象。我怎样才能只返回 json?