-2
我在JSON以下響應,我如何解析它解析JSON響應iphone目標C
[{"WordArray":[{"Id":11,"Word1":"ODDER","Category":"Dyr","Differculty":1,"Language":"Danish"},{"Id":225,"Word1":"PRAG","Category":"International by","Differculty":1,"Language":"Danish"}]},{"WordArray":[{"Id":3,"Word1":"TIGER","Category":"Dyr","Differculty":1,"Language":"Danish"},{"Id":154,"Word1":"BOLLE","Category":"Mad og drikke","Differculty":1,"Language":"Danish"}]},
{"WordArray":[{"Id":3,"Word1":"TIGER","Category":"Dyr","Differculty":1,"Language":"Danish"},{"Id":147,"Word1":"PIZZA","Category":"Mad og drikke","Differculty":1,"Language":"Danish"}]}]
我曾嘗試沒有運氣以下不確定
NSMutableArray* json = [NSJSONSerialization JSONObjectWithData:responseData options:kNilOptions error:&error];
NSMutableArray * roundWords = [[NSMutableArray alloc]retain ];
roundWords = [json objectAtIndex:i];
JSON包含了我3'WordArray',但我不確定如何繼續.. 如何迭代在WordArray
和NSLog Word1
值中的每個項目,例如?
謝謝!
另外請注意,這甚至與Xcode沒有遠程相關。 – 2013-02-27 18:25:31