function applyTemplateOptionsToResponse(response,templateOptions){

    if(templateOptions.map){
        for(let key in templateOptions.map){
            response = response.replace("{{" + key + "}}",templateOptions.map[key]);
        }
    }
    return response;
}
/**
 * Applies all template options to a response string. E.g. puts out map values
 * @param {*} response 
 * @param {*} templateOptions 
 */
Applies all template options to a response string.
Applies all template options to a response string .
function applyTemplateOptionsToResponse(response,templateOptions){
    if(templateOptions.map){
        for(let key in templateOptions.map){
            response = response.replace("{{" + key + "}}",templateOptions.map[key]);
        }
    }
    return response;
}
function applyTemplateOptionsToResponse ( response , templateOptions ) { if ( templateOptions . map ) { for ( let key in templateOptions . map ) { response = response . replace ( "{{" + key + "}}" , templateOptions . map [ key ] ) ; } } return response ; }
Applies all template options to a response string.
Applies all template options to a response string .