asp.net mvc3 retornar várias lista json
Im asp.net mvc3 código c # retorna json lista como esta:
return Json(new { name = UserNames, imageUrl = ImageUrls });
UserNames
eImageUrls
são ambosList<string>
tipos
E este é o meu javascript
function StartSearch(text) {
$.ajax({
url: '/Shared/Search',
type: 'POST',
data: { SearchText: text },
dataType: 'json',
success: function (result) {
$.each(result, function (i, item) {
alert(result[i].name);
});
}
});
}
Como eu posso conseguir nomes eImageUrls
?
obrigado