[Strip an infotable down to a datashape that is the subset of the input infotable] #Thingworx
var result = Resources["InfoTableFunctions"].CreateInfoTableFromDataShape({
infoTableName : "InfoTable",
dataShapeName : "MaintenanceTaskHistoryStreamDS"
});
Array.prototype.forEach.call(inputInfoTable.rows, function (row) { result.AddRow(yourRowObjectHere); });