I have some json data that coming from my php code here it is
{"Inboxunreadmessage":4,
"aaData":[{
"Inboxsubject":"Email SMTP Test",
"Inboxfrom":"Deepak Saini <*****@*****.co.in>"},
{"Inboxsubject":"Testing01",
"Inboxfrom":"Deepak Saini <**********@gmail.com>"}
]}
I'm fatching it like this
$(window).load(function(){
$.ajax({
dataType: "json",
type: "POST",
url: "/mail/mail-action",
data: {
_act: "load"
}
}).done(function(data) {
if(data.message){
showMessage(data);
}
//This is working
$('.Inboxunreadmessage').html(data.Inboxunreadmessage);
//This is Not working ----------------------
$('.Inboxsubject').html('<li><a href="#"><i class="fa fa-users text-aqua"></i> '+data.Inboxsubject+'</a></li>');
}).error(function(jqxhr, exception){
ajaxErrorHandler(jqxhr, exception);
});
});
I'm getting error in
$('.Inboxsubject').html('<li><a href="#"><i class="fa fa-users text-aqua"></i> '+data.Inboxsubject+'</a></li>');