title: Display radio button checked if json value is match to condition
body: <p>I've following Json data</p>
  
  <p>{"1":"2","2":"2"} this can be change as per conditions.</p>
  
  <p>I'm trying to implement radio button checked if Json contain value same as radio button.
  in Json first Value is radio name and 2nd is value that needs to match.</p>
  
  <pre><code> success : function(result){
          //alert(JSON.stringify(result));
          var contact = JSON.parse(result);
          alert("First: " + contact + " Second: " + contact);
          $('input[type=radio][name="' + group[contact[1]] + '"][value="' + contact[1] + '"]').prop('checked', true);
  
  
          }
  </code></pre>
  
  <p>Following is my html form </p>
  
  <pre><code>&lt;table width="50%" border="1" align="center" cellpadding="2" cellspacing="1" &gt;
  
  
  
  
  &lt;th&gt;&lt;td colspan='2'&gt; &lt;font color='#006699' size='3' face='Arial, Helvetica, sans-serif'&gt;&lt;strong&gt;    Assign User Role &lt;/br&gt;&lt;/br&gt;&lt;/strong&gt;&lt;/font&gt;&lt;/td&gt;&lt;/th&gt;
  
  
   &lt;tr bgcolor="#FFFFFF"&gt;
      &lt;td&gt;&lt;strong&gt;Select User:&lt;/strong&gt;&lt;/td&gt;
      &lt;td&gt;&lt;input type="text" name="assigned_to" id="assigned_to" /&gt;&lt;/td&gt;
   &lt;/tr&gt;
  
  &lt;tr bgcolor="#FFFFFF"&gt;
      &lt;td&gt;&lt;strong&gt;Page Group&lt;/strong&gt;&lt;/td&gt;
      &lt;td&gt;&lt;strong&gt;User Role &lt;/strong&gt;&lt;/td&gt; 
  &lt;/tr&gt;
  
  
  
  
  
  
      &lt;?php
      foreach($groups as $key=&gt;$value) 
      { ?&gt;    
          &lt;tr bgcolor='#FFFFFF'&gt;
          &lt;td&gt;&lt;strong&gt;&lt;?php echo $value; ?&gt;&lt;/strong&gt;&lt;/td&gt;
          &lt;td&gt;
          &lt;input type="radio" name="group[&lt;?php echo $key; ?&gt;]"  id="chk_group1" value="1" /&gt;Viewer
          &lt;input type="radio" name="group[&lt;?php echo $key; ?&gt;]"  id="chk_group2"  value="2" /&gt;Approver
          &lt;input type="radio" name="group[&lt;?php echo $key; ?&gt;]"  id="chk_group3" value="3" /&gt;Editor
          &lt;input type="radio" name="group[&lt;?php echo $key; ?&gt;]"  id="chk_group3" value="4" /&gt;Adder
          &lt;input type="radio" name="group[&lt;?php echo $key; ?&gt;]"  id="chk_group4" value="5" /&gt;Super Editor
          &lt;input type="radio" name="group[&lt;?php echo $key; ?&gt;]"  id="chk_group5" value="6" /&gt;Blocked
          &lt;/td&gt;
          &lt;/tr&gt;
      &lt;?php
      } 
      ?&gt;
  
  
   &lt;/tr&gt;
   &lt;tr&gt;&lt;/tr&gt; &lt;tr&gt;&lt;/tr&gt; &lt;tr&gt;&lt;/tr&gt;
   &lt;tr bgcolor="#FFFFFF"&gt;
      &lt;td&gt;&lt;/td&gt;
      &lt;td&gt;
          &lt;input type="submit" name="submit" value="Submit"/&gt;
      &lt;/td&gt;
  &lt;/tr&gt;
  </code></pre>
  
  <p></p>