I could very well be confused about how promises work, but I think you can just do
```javascript
return $.getJSON(url).then(function (data) {
  return loadJson(data, res_id);
}
```