var schemas = require('./outputSchema.json'); module.exports = function( record ){ var adminParts = []; var schema = schemas.default; if (record.country_a && record.country_a.length && schemas[record.country_a]) { schema = schemas[record.country_a]; } var buildOutput = function(parts, schemaArr, record) { for (var i=0; i