title: Radio Button Javascript Array
body: <p>I have a radio button like below</p>
  
  <pre><code>Apple
  &lt;input type="radio" id="one" name="apple" data-price="10" value="light"/&gt; Light
  &lt;input type="radio" id="two" name="apple" data-price="20" value="dark" /&gt; Dark
  &lt;input type="text" id="appleqty" name="appleqty" value="" /&gt;
  
  Mango
  &lt;input type="radio" id="three" name="Mango" data-price="30" value="light"/&gt; Light
  &lt;input type="radio" id="one" name="Mango" data-price="40" value="dark" /&gt; Dark
  &lt;input type="text" id="Mangoqty" name="Mangoqty" value="" /&gt;
  
  Pine Apple
  &lt;input type="radio" id="four" name="Pineapple" data-price="50" value="light"/&gt; Light
  &lt;input type="radio" id="five" name="Pineapple" data-price="60" value="dark" /&gt; Dark
  &lt;input type="text" id="Pineappleqty" name="Pineappleqty" value="" /&gt;
  
  Grape
  &lt;input type="radio" id="six" name="Grape" data-price="70" value="light"/&gt; Light
  &lt;input type="radio" id="seven" name="Grape" data-price="80" value="dark" /&gt; Dark
  &lt;input type="text" id="Pineappleqty" name="Pineappleqty" value="" /&gt;
  </code></pre>
  
  <p>I this i need to create a array like below</p>
  
  <pre><code>   array
        0 =&gt; 
          array
            'apple' =&gt; string 'light' (length=10)
            'price' =&gt; string '50' (length=1)
        1 =&gt; 
          array
            'Pineapple' =&gt; string 'dark' (length=10)
            'price' =&gt; string '60' (length=1)
  </code></pre>
  
  <p><strong>A Kind Note</strong> : <code>the array key should be the radio button name, the price should be taken from data-price in radio button</code>  and i need to serilize this array
  This should be done using javascript.</p>