JSFiddle - React, Tailwind, and code Playground
HTML
<dl>
<dt>Loading...</dt>
</dl>
CSS
dt { font-weight: bold; }
dd { margin-bottom: .5em; }
JavaScript
$.ajax({
type: 'GET',
url: 'http://young-dusk-4185.herokuapp.com',
crossDomain: true,
data: {"some":"json"},
dataType: 'json',
success: function(responseData, textStatus, jqXHR) {
$('dd, dt').remove();
$.each(responseData, function(k,v) {
$('dl').append('<dt>'+k+'</dt><dd>'+v+'</dd>');
});
},
error: function (responseData, textStatus, errorThrown) {
alert('Get failed.');
}
});