After for getting ajax response loading a div in the div i have radio button fields how should i write a condition inside jquery.
$.ajax({
url: "miscellaneous_fetch.php",
method: "POST",
data: {
transaction_id: transaction_id
},
dataType: "json",
success: function(data, textStatus, xhr) {
var html = '';
html += '<div class="col-md-1"></div><div class="col-md-3"><fieldset><h5 align="left"><b>Due-Date:</b></h5><div class="radio"><label><input type="radio" name="due_date" value="none" checked>None</label></div><div class="radio"><label><input type="radio" name="due_date" value="header" >Header</label></div><div class="radio"><label><input type="radio" name="due_date" value="body">Body</label></div></fieldset></div></div><br>';
$('.miscellaneous_body').append(html);
}
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.