I am returning a List<> from a webservice as a List of JSON objects.
(我从Web服务返回List <>作为JSON对象列表。)
I am trying to use a for loop to iterate through the list and grab the values out of the properties.(我试图使用for循环迭代列表并从属性中获取值。)
This is a sample of the returning JSON:(这是返回JSON的示例:)
{"d":[{"__type":"FluentWeb.DTO.EmployeeOrder",
"EmployeeName":"Janet Leverling",
"EmployeeTitle":"Sales Representative",
"RequiredDate":"/Date(839224800000)/",
"OrderedProducts":null}]}
So I am trying to extract the contents using something like this:
(所以我试图用这样的东西提取内容:)
function PrintResults(result) {
for (var i = 0; i < result.length; i++) {
alert(result.employeename);
}
How should this be done?
(该怎么做?)
ask by Nick translate from so
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…