title: How do I pass an array using the $.get method of jquery ajax?
body: <p>I am using following code in a script to call a servlet:</p>
  
  <pre><code>function dynamicallyDisplayText() {
      var doctype = document.getElementById("doctype");
      var lang = document.getElementById("lang");
      var inputNames = [];
      $("input").each(function () {
              var name = $(this).attr("name");
  
              if (((name) &amp;&amp; name !== ""))) {
              inputNames.push(this);
          }
      });
  
  $.get('ServletClass', {
      doctype: doctype,
      lang: lang,
      "inputNames": "inputNames"
  }, function (responseJson) {
      $.each(responseJson, function (index, fieldvalue) {
          CKEDITOR.instances.editor1.setData(fieldvalue);
      });
  });
  }
  </code></pre>
  
  <p>However, it's not redirecting on the servlet as intended. I want to use only the <code>$.get</code> method, so how do I pass an array to <code>$.get</code> method so that I can redirect on the servlet.</p>