lib/library.js
function() {
            let results = query('select * from questionnaire');

            for(let questionnaire of results) {
                // load data fields
                questionnaire.language_data = {};
                let dataResults = query('select field, question_td_id from questionnaire_data_field where questionnaire_id=?',
                    [questionnaire.id]);
                for(let data of dataResults) {
                    questionnaire.language_data[data.field] = data.question_td_id;
                }
            }
            return results;
        }
function() {
            let results = query('select * from questionnaire');

            for(let questionnaire of results) {
                // load data fields
                questionnaire.language_data = {};
                let dataResults = query('select field, question_td_id from questionnaire_data_field where questionnaire_id=?',
                    [questionnaire.id]);
                for(let data of dataResults) {
                    questionnaire.language_data[data.field] = data.question_td_id;
                }
            }
            return results;
        }
function ( ) { let results = query ( 'select * from questionnaire' ) ; for ( let questionnaire of results ) { // load data fields questionnaire . language_data = { } ; let dataResults = query ( 'select field, question_td_id from questionnaire_data_field where questionnaire_id=?' , [ questionnaire . id ] ) ; for ( let data of dataResults ) { questionnaire . language_data [ data . field ] = data . question_td_id ; } } return results ; }
Returns a list of questionnaires.

@returns {[{}]} a list of questionnaires
Returns a list of questionnaires .