开发者

json returning list<customers>

开发者 https://www.devze.com 2023-03-02 00:40 出处:网络
i\'m returning List<Customer> as json result in my con开发者_如何学运维troller. in the client script i can see the customers fine being returned.

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);
}
0

精彩评论

暂无评论...
验证码 换一张
取 消