我在 ajax 响应中收到以下 Json 数据...我不知道如何遍历它我想遍历它并从中制作一个数组,我将在 HTML DOM 中使用它也我想缓存这个数据如果数据已经可用,则不再有 Ajax 请求...
我该怎么做,我试过用 $.each(data, function(key,value){ ---- }) 来做。但问题是循环数据我想放一个for循环,在里面我想填充一些其他数组或对象......
这有意义吗,我们可以这样做吗?
{"CountryCode":"ABW","Language":"Dutch"}{"CountryCode":"ABW","Language":"English"}{"CountryCode":"ABW","Language":"Papiamento"}{"CountryCode":"ABW","Language":"Spanish"}{"CountryCode":"AFG","Language":"Balochi"}{"CountryCode":"AFG","Language":"Dari"}{"CountryCode":"AFG","Language":"Pashto"}{"CountryCode":"AFG","Language":"Turkmenian"}{"CountryCode":"AFG","Language":"Uzbek"}{"CountryCode":"AGO","Language":"Ambo"}{"CountryCode":"AGO","Language":"Chokwe"}{"CountryCode":"AGO","Language":"Kongo"}{"CountryCode":"AGO","Language":"Luchazi"}{"CountryCode":"AGO","Language":"Luimbe-nganguela"}{"CountryCode":"AGO","Language":"Luvale"}{"CountryCode":"AGO","Language":"Mbundu"}{"CountryCode":"AGO","Language":"Nyaneka-nkhumbi"}{"CountryCode":"AGO","Language":"Ovimbundu"}{"CountryCode":"AIA","Language":"English"}{"CountryCode":"ALB","Language":"Albaniana"}{"CountryCode":"ALB","Language":"Greek"}{"CountryCode":"ALB","Language":"Macedonian"}{"CountryCode":"AND","Language":"Catalan"}{"CountryCode":"AND","Language":"French"}{"CountryCode":"AND","Language":"Portuguese"}{"CountryCode":"AND","Language":"Spanish"}{"CountryCode":"ANT","Language":"Dutch"}{"CountryCode":"ANT","Language":"English"}{"CountryCode":"ANT","Language":"Papiamento"}{"CountryCode":"ARE","Language":"Arabic"}{"CountryCode":"ARE","Language":"Hindi"}{"CountryCode":"ARG","Language":"Indian Languages"}{"CountryCode":"ARG","Language":"Italian"}{"CountryCode":"ARG","Language":"Spanish"}{"CountryCode":"ARM","Language":"Armenian"}{"CountryCode":"ARM","Language":"Azerbaijani"}{"CountryCode":"ASM","Language":"English"}{"CountryCode":"ASM","Language":"Samoan"}{"CountryCode":"ASM","Language":"Tongan"}{"CountryCode":"ATG","Language":"Creole English"}{"CountryCode":"ATG","Language":"English"}{"CountryCode":"AUS","Language":"Arabic"}{"CountryCode":"AUS","Language":"Canton Chinese"}{"CountryCode":"AUS","Language":"English"}{"CountryCode":"AUS","Language":"German"}{"CountryCode":"AUS","Language":"Greek"}{"CountryCode":"AUS","Language":"Italian"}{"CountryCode":"AUS","Language":"Serbo-Croatian"}{"CountryCode":"AUS","Language":"Vietnamese"}{"CountryCode":"AUT","Language":"Czech"}{"CountryCode":"AUT","Language":"German"}{"CountryCode":"AUT","Language":"Hungarian"}{"CountryCode":"AUT","Language":"Polish"}{"CountryCode":"AUT","Language":"Romanian"}{"CountryCode":"AUT","Language":"Serbo-Croatian"}{"CountryCode":"AUT","Language":"Slovene"}{"CountryCode":"AUT","Language":"Turkish"}{"CountryCode":"AZE","Language":"Armenian"}{"CountryCode":"AZE","Language":"Azerbaijani"}{"CountryCode":"AZE","Language":"Lezgian"}{"CountryCode":"AZE","Language":"Russian"}{"CountryCode":"BDI","Language":"French"}{"CountryCode":"BDI","Language":"Kirundi"}{"CountryCode":"BDI","Language":"Swahili"}{"CountryCode":"BEL","Language":"Arabic"}{"CountryCode":"BEL","Language":"Dutch"}{"CountryCode":"BEL","Language":"French"}{"CountryCode":"BEL","Language":"German"}{"CountryCode":"BEL","Language":"Italian"}{"CountryCode":"BEL","Language":"Turkish"}{"CountryCode":"BEN","Language":"Adja"}{"CountryCode":"BEN","Language":"Aizo"}