我如何轉換這個JSON數組:如何將JSON數組轉換爲Xcode中的數組?
這是一個序列化JSON數組
2012-06-18 09:22:07.647 TableView[468:f803] (
{
"Countries" = Iceland;
"id"=9046567;
"name"=abceeeffdsg;
},
{
"Countries" = Greenland;
"id"=3524695;
"name"=gsfjgfsethju;
},
{
"Countries" = Switzerland;
"id"=4613583;
"name"=hdfkdgs;
)
但我需要這個數組轉換成以下陣列:
{
NSArray* Countries = (
Iceland,
Greenland,
Switzerland,
);
NSArray *id=(9046567,3524695,4613583);
NSArray * name=(abceeeffdsg,gsfjgfsethju,hdfkdgs);
}
要不然我只是想在我的桌子視圖上顯示這些項目作爲一個單元.. 任何人都可以建議一些代碼並解釋此....
你忘了張貼JSON陣列... – Alladinian
這是不是有效的JSON,更不用說數組了;)請參閱[this](http://stackoverflow.com/questions/3562478/native-json-support-in-ios)用於JSON序列化的線程 – poncha