Skip to content

Instantly share code, notes, and snippets.

@doug1n
Created February 28, 2020 13:31
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save doug1n/0306b545a3aa9a442da7ba8347501bce to your computer and use it in GitHub Desktop.
Save doug1n/0306b545a3aa9a442da7ba8347501bce to your computer and use it in GitHub Desktop.
const ds = DatasetFactory.getDataset('workflowProcess', null, null, null);
const outObject = ds.values.reduce(function(a, e) {
let estKey = (e['processId']);
(a[estKey] ? a[estKey] : (a[estKey] = null || [])).push(e);
return a;
}, {});
console.log(outObject);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment