title: how to select name array of multiple select box using jquery
body: <p>I just want the values selected of the question[],operator[], of the multiple select box using jquery,  Can anyone suggest me to get me out of here to get the values of question[] selected. Here is the html code,</p>
  
  <pre><code>&lt;div class="conditions-container js-widget-container" style=""&gt;
  
  
                  &lt;div class="skip-logic-form-branch-statement ifStatement editing"&gt;
  
  
  
          &lt;span class="skip-logic-form-branch-control"&gt;
  
              &lt;span class="if-text" style="  display:block; "&gt;IF&lt;/span&gt;
  
              &lt;select name="operator[]" class="form-control logic-operator" style="   display:none; "&gt;
                  &lt;option value="and"&gt;AND&lt;/option&gt;
                  &lt;option value="or"&gt;OR&lt;/option&gt;
              &lt;/select&gt;
          &lt;/span&gt;
  
  
          &lt;span class="selectContainer"&gt;
              &lt;select name="question[]" class="form-control logic-question bound" onchange="getAnswer('a')"&gt;
                                  &lt;option value="752"&gt;Q1:que2&lt;/option&gt;
  
                                  &lt;option value="745"&gt;Q2:a1&lt;/option&gt;
  
                              &lt;/select&gt;
              :
  
              &lt;select name="answer[]" class="form-control logic-answer"&gt;&lt;option value="-1"&gt;-- Select Answer Option --&lt;/option&gt;
  
              &lt;option value="2016"&gt;a4&lt;/option&gt;
              &lt;option value="2015"&gt;a3&lt;/option&gt;
              &lt;option value="2014"&gt;a2&lt;/option&gt;
              &lt;option value="2013"&gt;a1&lt;/option&gt;
  
          &lt;/select&gt;
  
              &lt;select name="condition[]" class="form-control logic-condition"&gt;
                  &lt;option value="true"&gt;is selected&lt;/option&gt;
                  &lt;option value="false"&gt;is not selected&lt;/option&gt;
              &lt;/select&gt;
                                              &lt;span style="cursor: pointer" class="pull-right"&gt;&lt;i class="fa fa-trash-o"&gt;&lt;/i&gt; &lt;/span&gt;
  
          &lt;/span&gt;
  
      &lt;/div&gt;
  
  
                  &lt;div class="skip-logic-form-branch-statement ifStatement editing"&gt;
  
  
  
          &lt;span class="skip-logic-form-branch-control"&gt;
  
              &lt;span class="if-text" style="   display:none; "&gt;IF&lt;/span&gt;
  
              &lt;select name="operator[]" class="form-control logic-operator" style="  display:block; "&gt;
                  &lt;option value="and"&gt;AND&lt;/option&gt;
                  &lt;option value="or"&gt;OR&lt;/option&gt;
              &lt;/select&gt;
          &lt;/span&gt;
  
  
          &lt;span class="selectContainer"&gt;
              &lt;select name="question[]" class="form-control logic-question bound" onchange="getAnswer('a')"&gt;
                                  &lt;option value="752"&gt;Q1:que2&lt;/option&gt;
  
                                  &lt;option value="745"&gt;Q2:a1&lt;/option&gt;
  
                              &lt;/select&gt;
              :
  
              &lt;select name="answer[]" class="form-control logic-answer"&gt;&lt;option value="-1"&gt;-- Select Answer Option --&lt;/option&gt;
  
              &lt;option value="2016"&gt;a4&lt;/option&gt;
              &lt;option value="2015"&gt;a3&lt;/option&gt;
              &lt;option value="2014"&gt;a2&lt;/option&gt;
              &lt;option value="2013"&gt;a1&lt;/option&gt;
  
          &lt;/select&gt;
  
              &lt;select name="condition[]" class="form-control logic-condition"&gt;
                  &lt;option value="true"&gt;is selected&lt;/option&gt;
                  &lt;option value="false"&gt;is not selected&lt;/option&gt;
              &lt;/select&gt;
                                              &lt;span style="cursor: pointer" class="pull-right"&gt;&lt;i class="fa fa-trash-o"&gt;&lt;/i&gt; &lt;/span&gt;
  
          &lt;/span&gt;
  
      &lt;/div&gt;
  
                                          &lt;/div&gt;
  </code></pre>
  
  <p>Jquery code</p>
  
  <pre><code>$("select[name='question[]']").map(function(){ alert($(this).val());
  
      });
  </code></pre>
  
  <p>Image</p>
  
  <p><a href="https://i.stack.imgur.com/YK123.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/YK123.png" alt="enter image description here"></a></p>