title: How do I get the values of multiple fileds having same name attribute using jquery or javascript?
body: <p>I am submitting a form using ajax. In the form user can create input fields dynamically and then input data into them. I want that when form is submitted I get all the instances of input fields and then place there values in an array to pass to ajax function. How do I do that?
  Here is my HMTL code snippet:</p>
  
  <pre><code>&lt;input type="text" name="movies[]" &gt;//user can create as many fields dynamically as they want to and then submit the form.
  </code></pre>
  
  <p>How do I get the values of all input fields named movies[]?</p>
  
  <p>Here is my jquery code for form:</p>
  
  <pre><code>$("#subscription").submit(function(){
  
  //How to get the all the input fields named movies[] values here?
  
  $.ajax({
  
  //Form submission logic using ajax here
  
  });
  
  });
  </code></pre>