2012-05-18 10 views
0

안녕하세요 저는 Sencha Touch 2를 처음 사용하고 있습니다. 웹 서비스를 사용하고 있습니다. 목록에서 데이터를 반환하고 있습니다.목록에서 데이터를 가져 오는 방법

request: Array[2] 
0: Object 
Address: "1 Bangalore" 
Name: "Vinay" 
__type: "Customer:#WcfService1" 
__proto__: Object 
1: Object 
Address: "1 Kerala" 
Name: "Sujay" 
__type: "Customer:#WcfService1" 
+2

아직 요청 [0]을 (를) 해 보셨습니까? – Blender

+0

http://stackoverflow.com/questions/921789/how-to-loop-through-javascript-object-literal-with-objects-as-members –

+0

http://stackoverflow.com/a/3010848/365188 –

답변

1

당신은 단지 결과를 반복 할 수 있습니다 : 그래서 목록

여기

의 데이터를 반복하는 방법에 출력됩니다.

for (person in request) { 
    doSomethingWithPerson(person); 
} 

사용자는 .Name 및 .Address 속성을 가진 개체 일뿐입니다.

관련 문제