简体   繁体   English

迭代json响应

[英]Iterating the json response

http://paste.pocoo.org/show/VEB0PT7yZO1yuOxtrXGP/ http://paste.pocoo.org/show/VEB0PT7yZO1yuOxtrXGP/

I tried the following way, but i could not get the result. 我尝试了以下方法,但无法获得结果。

     for (i = 0, len = json.PatientListGetResult.Appointments.length; i < len && i <= 100; i++) {
          alert(json.PatientListGetResult.Appointments[i].Patient.PatientID);
      }

How can i iterate this response, so that i can get the each Patient's Name and ID. 我如何迭代此响应,以便获得每个患者的姓名和ID。 There are total 11 rows. 共有11行。

working here: http://jsfiddle.net/UsvFV/ 在这里工作: http : //jsfiddle.net/UsvFV/

In the json response, you had missed out '}' (the last right curly bracket) 在json响应中,您错过了'}'(最后一个大括号)

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM