I am using asp.net mvc with jquery... I have made a json call to a controller method and it returns json object [Object object]
for me. I dont want that instead i want to get the json string... Any suggestion...
$(document).ready(function() {
$.getJSON('Materials/GetMaterials', null, function(data) {
alert(data);
});
});
I gave alert(data.d);
and it is undefined
public JsonResult GetMaterials()
{
var materials = consRepository.FindAllMaterials().AsQueryable();
return Json(materials);
}