lib/impl/deleteSubmission.js
function(submission) {
  return _.flatten(submission.formFields.map(function(field) {
    return field.fieldValues.filter(hasGroupId);
  }).map(function(fieldValue) {
    return fieldValue.map(extractGroupId);
  }));
}
function(submission) {
  return _.flatten(submission.formFields.map(function(field) {
    return field.fieldValues.filter(hasGroupId);
  }).map(function(fieldValue) {
    return fieldValue.map(extractGroupId);
  }));
}
function ( submission ) { return _ . flatten ( submission . formFields . map ( function ( field ) { return field . fieldValues . filter ( hasGroupId ) ; } ) . map ( function ( fieldValue ) { return fieldValue . map ( extractGroupId ) ; } ) ) ; }
Returns all the `groupId` values for the passed-in submission.

A submission can have multiple fields, and each field can have
multiple fieldValues.
Returns all the groupId values for the passed - in submission .