I try to use an object receive from a Ajax request, but nothing appears. I don't see my mistake, so i'm going step by step. In this case i want to get the size value (37 in my example) from the Object (convert in json):
function modsdetails(server)
{
clearTimeout(myReloadPageTimeout);
$(".modal-body #detailsId").text("");
$.ajax({
type : "GET",
url : url + "/modsdetails?server=" + server,
dataType: 'json',
success: function(data)
{
var parseData = JSON.parse(data);
var detail = parseData.size;
fillData(detail);
},
error : function(e)
{
fillData(null);
}
});
$('#modalId').modal('show');
}
function fillData(data)
{
if(data!=null)
{
$(".modal-body #detailsId").text(data);
}
else
{
$(".modal-body #detailsId").text("Can Not Get Data from Server!");
}
}
I have make a test with Postman to see what is the return and that is :
{
"ServerModsList": [
"areas",
"utilities"
],
"DefaultModsList": [
"beds",
"boats",
"bones",
"bucket",
"carts"
],
"unknownServerModList": [],
"size": 37
}
The result is that nothing appear in my modal windows.
Thanks for your ideas/help