json returning list<customers>
i'm returning List<Customer>
as json result in my con开发者_如何学运维troller. in the client script i can see the customers fine being returned.
can i somehow use the forin loop? because when i try it says that var i is undefined.
for (var i in customers)
{
alert(i.CustomerName);
}
try:
for (var i in customers)
{
alert(customers[i].CustomerName);
}
精彩评论