title: How can I call function?
body: <p>Suppose that after click on the button - we send request. I have jquery plugin with structure like this:</p>
  
  <pre><code>(function($){
  
      $.myPlugin = {
          defaults: {}
      };
  
      $.fn.extend({
          /**
           * Initializes the plugin
           */
          myPlugin: function(settings)
          {
              return this.each(function() {
  
                  settings = $.extend({}, $.myPlugin.defaults, settings);
                  $.data(this, "myPlugin", settings);
  
                  var self = this;
  
                  $('#button', self).on('click', function () {
                      functionTwo.call(this);
                  });
              });
          }
      });
  
      function functionOne()
      {
          alert(1);
      }
  
      function functionThree()
      {
          alert(3);
      }
  
      function functionTwo(self)
      {
          $.ajax({
              url: '/some_url',
              type: 'GET',
              success: function (response) {
  
                  // Here I need to call function depends on response.funcName.
                  // Where funcName can be functionThree, functionOne, etc.
                  // I try something like that: window[funcName], etc. But it was
                  // not successfully.
              } 
          });
      }
  })(jQuery);
  </code></pre>
  
  <p>Here in functionTwo after ajax response I need to call function depends on response.funcName. Where response.funcName can be functionThree, functionOne, etc. I try something like that: windowfuncName, etc. But it was not successfully.</p>
  
  <p>I don't understand where this functions (functionThree, functionOne, etc) are declared, in what scope? And how can I call it dynamically?</p>