$(function () { var html = '{0}{1}{2}{3}'; function listData() { bd({ Id: 'inbox', url: '../api/Messages/', method: 'GET', swal: false, callback: function (result) { if (result) { var content = result.map(function (mail) { return $.format(html, mail.FromDisplayName, mail.Title, mail.Content, mail.SendTime); }).join(''); $('#tbMsg').html(content); } console.log(result); } }); } listData(); });