Refactoring getObjectFromJsonGetRequest in oAjax.js