title: Check a radio button with data from JSON
body: <p>I have the  following radio buttons : </p>
  
  <pre><code>&lt;td valign="top"&gt;
      &lt;label&gt;Have you ever been tested?&lt;/label&gt;
  
      &lt;input required id="Test" name="Test" type="radio" class="wellness_center radiostyle" value="1"&gt;
      &lt;div class="radiolabel"&gt;Yes&lt;/div&gt;
      &lt;input required id="Test" name="Test" type="radio" class="wellness_center radiostyle" value="0"&gt;
      &lt;div class="radiolabel"&gt;No&lt;/div&gt;
  &lt;/td&gt;
  </code></pre>
  
  <p>Which submits data to the  database in the  form of 0 and 1 (1=Yes,0=No). 
  I would like to pull this information from the database and re-map/highlight back the radio button based on the value that was saved in the database. I tried the  following method : </p>
  
  <pre><code>$.ajax({
      type: "GET",
      url: "database/Emarps/websrvc/websrvc.php?task=getData&amp;UUID=" + currentuuid + "&amp;DataGt=hk",
      dataType: "JSON",
      success: function (response) {
          $.each(response, function (i, resp) {
  
              if (resp.tested === $("input[name='Test'][value='1']").prop('checked', true)) {
  
              } else if (resp.tested === $("input[name='Test'][value='0']").prop('checked', true)) {
  
              }
  
          });
      }
  });
  </code></pre>
  
  <p>Which retrieves the  data very well from the  database but it fails to map it to the respective radio buttons. Please assist , how can I map it back to the right radio base on values from Database passed through JSON?</p>