var itemArray = [];
for (var i = 0; i < data.length; i++) {
var items = data[i].split(",");
downloadID = items[0].trim();
noOfDownloads = items[1];
var itemCreateInfo = new SP.ListItemCreationInformation();
var oListItem = oList.addItem(itemCreateInfo);
oListItem.set_item('DownloadID', downloadID);
oListItem.set_item('NoOfDownloads', noOfDownloads);
oListItem.update();
itemArray[i] = oListItem;
clientContext.load(itemArray[i]);
}
}
}
clientContext.executeQueryAsync(
Function.createDelegate(this, this.onFileUploadSucceeded1),
Function.createDelegate(this, this.onFileUploadFailed1)
);
}
Please suggest, what could be the problem.