Skip to content

Instantly share code, notes, and snippets.

@jhowliu
Last active September 16, 2017 07:28
Show Gist options
  • Save jhowliu/7dbd7a4dca98003bbab10c9bbbea56a6 to your computer and use it in GitHub Desktop.
Save jhowliu/7dbd7a4dca98003bbab10c9bbbea56a6 to your computer and use it in GitHub Desktop.
.then(data => {
data.map(function(label) {
comment_count = 0;
label.processes.map(function(process) {
process.group.sentence = process.group.sentence.trim().split(',');
comment_count += process.group.sentence.length;
});
label['comment_count'] = comment_count;
});
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment