I want to return an array from controller to view by ajax call,
and my array is a generic array (a list of objects such as an instance of Employee class).
I want loop on result and have access to objects property such as Name,
and I do not know, how can I return generic array for result from C# action (json or ...) ,
What is the return type of action?
This is my code:
$.ajax({
url: '@Url.Action("EditDayRequest", "Message")',
type: 'Post',
cache: false,
data: { IsChecked: $(this).is(':checked')},
success: function (result) {
// i want to loop here on returned array and get values
}