Skip to content

Instantly share code, notes, and snippets.

@jaawerth
Created November 14, 2015 20:32
Show Gist options
  • Save jaawerth/0632c963f87b1da338e3 to your computer and use it in GitHub Desktop.
Save jaawerth/0632c963f87b1da338e3 to your computer and use it in GitHub Desktop.
cleanUpOriginList(){
var i;
for (i = this.originList.length; i--;) {
delete this.originList[i].id;
delete this.originList[i].createdBy;
delete this.originList[i].modifiedBy;
delete this.originList[i].createdDate;
delete this.originList[i].createdDate;
delete this.originList[i].modifiedDate;
if (this.originList[i].targetName === '') {
this.originList.splice(i, 1);
}
};
this.originList.forEach(function(item, index) { item.destinationOrder = index+1; });
}`
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment