title: ajax sucess response data to load a div using if condition
body: <p>After for getting ajax response loading a div in the div i have radio button fields how should i write a condition inside jquery. </p>
  
  <pre class="lang-js prettyprint-override"><code>$.ajax({
    url: "miscellaneous_fetch.php",
    method: "POST",
    data: {
      transaction_id: transaction_id
    },
    dataType: "json",
    success: function(data, textStatus, xhr) {
      var html = '';
      html += '&lt;div class="col-md-1"&gt;&lt;/div&gt;&lt;div class="col-md-3"&gt;&lt;fieldset&gt;&lt;h5 align="left"&gt;&lt;b&gt;Due-Date:&lt;/b&gt;&lt;/h5&gt;&lt;div class="radio"&gt;&lt;label&gt;&lt;input type="radio" name="due_date" value="none"  checked&gt;None&lt;/label&gt;&lt;/div&gt;&lt;div class="radio"&gt;&lt;label&gt;&lt;input type="radio" name="due_date" value="header" &gt;Header&lt;/label&gt;&lt;/div&gt;&lt;div class="radio"&gt;&lt;label&gt;&lt;input type="radio" name="due_date" value="body"&gt;Body&lt;/label&gt;&lt;/div&gt;&lt;/fieldset&gt;&lt;/div&gt;&lt;/div&gt;&lt;br&gt;';
      $('.miscellaneous_body').append(html);
    }
  </code></pre>
  
  <p>i want to write if condition to check with ajax response data where checked or not if checked we have to put checked tag to that field.</p>