lib/impl/getForm.js
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);
  }
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);
  }
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 ) ; }
Extract a list of data sources from forms
@param forms
Extract a list of data sources from forms