Get values of all textboxes with same name attributes in jquery
<p>I need to get values of all textboxes with same name attributes using jquery.</p>

<pre><code>&lt;input type="text" id="text1" name="text[]"&gt;
&lt;input type="text" id="text2" name="text[]"&gt;
&lt;input type="text" id="text3" name="text[]"&gt;
</code></pre>

<p>How can I get all values of textbox <strong>text[]</strong> and compare it using jquery.</p>

<p>I tried using </p>

<pre><code> var values = $("input[name='text[]']")
 .map(function(){return $(this).val();}).get();
</code></pre>

<p>but am no successful.</p>
