Hi walker1234,
You’re not adding the data for the “description” to your array. You’re only adding the item itself and the date, but not the description. Here’s how it should look:
for (var i = 0; i < data.length; i++) {
if (i == 0) {
var newItem = {};
newItem.key = data[i].name;
newItem.dates = [data[i].date];
newItem.description = data[i].description; //new
array.push(newItem);
} else {
var item = data[i];
var itemName = item.name;
var itemDate = item.date;
var itemDescription = item.description; //new
if (isUsedKey(array, itemName)) {
for (var j = 0; j < array.length; j++) {
if (array[j].key == itemName) {
var index = array[j].dates.length;
array[j].dates[index] = itemDate;
}
}
} else {
var nextNewItem = {};
nextNewItem.key = itemName;
nextNewItem.dates = [itemDate];
nextNewItem.description = itemDescription; //new
array.push(nextNewItem);
}
}
}
And here’s a fiddle link with the changes:
https://jsfiddle.net/7ucvy5yr/66/
Best Regards,
Christopher
jQWidgets Team
http://www.jqwidgets.com