2012-05-18 261 views
0

嗨,我是新來的sencha touch 2.我正在使用Web服務。它正在返回列表對象中的數據。 所以如何從列表如何從列表中獲取數據

這裏重複的數據輸出:

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屬性的對象。