First, let's
Get some data via an API...
var settings = {
"async": true,
"crossDomain": true,
"url": "https://schematic-ipsum.herokuapp.com/?n=50",
"method": "POST",
"headers": {
"content-type": "application/json"
},
"data": "{\n \"type\": \"object\",\n \"properties\": {\n \"Date\": { \"type\": \"string\", \"format\": \"date-time\" },\n \"Name\": { \"type\": \"string\", \"ipsum\": \"name\" },\n \"Group\": {\n \"type\": \"string\",\n \"enum\": [\"Plankton\", \"Islander\", \"Mystic\", \"Veterans\"]\n},\n \"City\": {\n \"type\": \"string\",\n \"enum\": [\"Entebbe\", \"Kampala\", \"Jinja\", \"Masindi\", \"Gulu\", \"Masaka\", \"Mbarara\"]\n},\n \"Age\": { \"type\": \"integer\" },\n\t \"Score\": { \"type\": \"number\" },\n\t \"Rank\": { \"type\": \"integer\" }\n \n }\n}"
}
// in this case, the data is obtained via an api, and then we pass the result to
// Meliorator
$.ajax(settings).done(function (response) {
initPanels(JSON.parse(response));
});