code: function getDataSourceIds(forms) {
      var dataSources = _.map(forms, function(form) {
        return _.map(form.dataSources.formDataSources, function(dataSourceMeta) {
          return dataSourceMeta._id.toString();
        });
      });
  
      dataSources = _.flatten(dataSources);
  
      //Only want unique data source Ids as multiple forms may use the same data source.
  
      return _.uniq(dataSources);
    }
docs: Extract a list of data sources from forms
  @param forms