Loop through JSON object List

后端 未结 8 1996
忘掉有多难
忘掉有多难 2020-11-28 20:51

I am returning a List<> from a webservice as a List of JSON objects. I am trying to use a for loop to iterate through the list and grab the values out of the properties.

8条回答
  •  醉梦人生
    2020-11-28 21:12

    Be careful, d is the list.

    for (var i = 0; i < result.d.length; i++) { 
        alert(result.d[i].employeename);
    }
    

提交回复
热议问题