var self = this app.server.get('xio/admin/info').then(function(resp) { console.log(resp.content) var html = json2html(resp.content) $(self).html(html) })