このコードが機能しない理由を誰かに説明してもらえますか? 配列の要素を NSLog に送信しても問題はありませんが、文字列に追加されていないようです。配列要素を文字列にキャストする必要がありますか?
success:^(NSURLRequest *request, NSHTTPURLResponse *response, id JSON) {
NSArray *dataarray=[JSON valueForKey:@"Data"];
NSLog(@"Response: %@", [JSON valueForKeyPath:@"Status"]);
NSString* output = [NSString stringWithFormat:@"response: %@",[JSON valueForKeyPath:@"Status"]];
int x;
for (x=0; x<[dataarray count]; x++) {
NSLog(@"%d : %@",x, [dataarray objectAtIndex:x]);
[output stringByAppendingFormat:@" %@ ",[dataarray objectAtIndex:x]];
}
//NSLog(@"%@", JSON);
NSLog(@"%@", output);
self.outPut2.text=output; }