Я хочу проанализировать следующий JSON с помощью Titanium Appcelerator Mobile SDK
[{"City":null,"Distance":469,"Email":null,"Latitude":0,"Longitude":0,"Name":"Cretin-Derham Hall","PhoneNo":null,"SchoolId":75,"State":null,"Zip":null},{"City":null,"Distance":213,"Email":null,"Latitude":0,"Longitude":0,"Name":"East Ridge","PhoneNo":null,"SchoolId":76,"State":null,"Zip":null},{"City":null,"Distance":26,"Email":null,"Latitude":0,"Longitude":0,"Name":"Hastings","PhoneNo":null,"SchoolId":78,"State":null,"Zip":null},{"City":null,"Distance":116,"Email":null,"Latitude":0,"Longitude":0,"Name":"Stillwater","PhoneNo":null,"SchoolId":81,"State":null,"Zip":null},{"City":null,"Distance":0,"Email":null,"Latitude":0,"Longitude":0,"Name":"White Bear Lake","PhoneNo":null,"SchoolId":82,"State":null,"Zip":null}]
Я хочу проанализировать это и поместить все значения «Имя» в TableView / ListView.Кто-нибудь может мне помочь?
Вот мой текущий код, который у меня есть:
var xhr = Titanium.Network.createHTTPClient();
xhr.onload = function()
{
Ti.API.info('in utf-8 onload for GET');
var schools = eval('(' + this.responseText +')');
};
Заранее спасибо