Here is my jQuery code:
$.get('/Home/GetList', function(data) {
debugger;
$('#myMultiSelect').val(data);
});
Here is my controller code:
public ActionResult GetList(int id)
{
int[] bodyParts = _repository.GetList(id);
//how do i return this as an array back to javascript ??
}
if I have the GetList
function return an array of integers, how do I return this to the jQuery function?