title: Get radio button value by the group
body: <p>I have a bunch of radio button on my single page, and I want to get a value from the checked one</p>
  
  <p>Here's my HTML Code</p>
  
  <pre><code>&lt;div class="row"&gt;
  //first radio button group
      &lt;div class="col-md-1 col-xs-1 col-sm-1"&gt;&amp;nbsp;&lt;/div&gt;
      &lt;div class="col-md-1 col-xs-1 col-sm-1 centerText" &gt;&lt;input type="radio" name="pertanyaan1" value="1"&gt;&lt;br&gt;1&lt;!--&lt;br&gt;Awful--&gt;&lt;/div&gt;
      &lt;div class="col-md-1 col-xs-1 col-sm-1 centerText" &gt;&lt;input type="radio" name="pertanyaan1" value="2"&gt;&lt;br&gt;2&lt;/div&gt;
      &lt;div class="col-md-1 col-xs-1 col-sm-1 centerText" &gt;&lt;input type="radio" name="pertanyaan1" value="3"&gt;&lt;br&gt;3&lt;/div&gt;
      &lt;div class="col-md-1 col-xs-1 col-sm-1 centerText" &gt;&lt;input type="radio" name="pertanyaan1" value="4"&gt;&lt;br&gt;4&lt;/div&gt;
      &lt;div class="col-md-1 col-xs-1 col-sm-1 centerText" &gt;&lt;input type="radio" name="pertanyaan1" value="5"&gt;&lt;br&gt;5&lt;!--&lt;br&gt;Ok--&gt;&lt;/div&gt;
      &lt;div class="col-md-1 col-xs-1 col-sm-1 centerText" &gt;&lt;input type="radio" name="pertanyaan1" value="6"&gt;&lt;br&gt;6&lt;/div&gt;
      &lt;div class="col-md-1 col-xs-1 col-sm-1 centerText" &gt;&lt;input type="radio" name="pertanyaan1" value="7"&gt;&lt;br&gt;7&lt;/div&gt;
      &lt;div class="col-md-1 col-xs-1 col-sm-1 centerText" &gt;&lt;input type="radio" name="pertanyaan1" value="8"&gt;&lt;br&gt;8&lt;/div&gt;
      &lt;div class="col-md-1 col-xs-1 col-sm-1 centerText" &gt;&lt;input type="radio" name="pertanyaan1" value="9"&gt;&lt;br&gt;9&lt;/div&gt;
      &lt;div class="col-md-1 col-xs-1 col-sm-1 centerText" &gt;&lt;input type="radio" name="pertanyaan1" value="10"&gt;&lt;br&gt;10&lt;!--&lt;br&gt;Incridible--&gt;&lt;/div&gt;
      &lt;div class="col-md-1 col-xs-1 col-sm-1"&gt;&amp;nbsp;&lt;/div&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p>I've tried using loop like this</p>
  
  <pre><code>var pertanyaan1 = 1;
          var isipertanyaan1 = 0;
          $("input[name=pertanyaan1]").each(function(){
  
              if($("input[name=pertanyaan1][value="+pertanyaan1+"]").prop("checked","checked"))
              {
                  console.log($("input[name=pertanyaan1][value="+pertanyaan1+"]").prop("checked","checked"));
                  isipertanyaan1 = pertanyaan1;
                  // break();
              }
              // console.log(pertanyaan1);
              pertanyaan1++;
          });
  </code></pre>
  
  <p>but that code make the <code>if</code> useless.. The radio not filtered..</p>
  
  <p>how to solve this ?</p>