objective c - AFNetworking responseobejct problems in getting to see the dictionary -


all,

I am trying to retrieve objects from the response code Afnetworking , I do not think the feedback object is a dictionary, but I'm sure it is.

Here is my code:

  NSURLRequest * request = [[NSURRACC ALOOC] Inteverturel: Return Completed URL]; AFHTTPRequestOperation * Operation = [[FTPTRAQAZ Operation ALOOS] InitVethReveveist: Request]; Operation.responseSerializer = [AFJSONResponseSerializer serializer]; Operation.responseSerializer. AcceptablecontentTaps = [NSSet set with object: @ "text / html"]; [Operation Set Complete BlockWithSoftware: ^ (FHTPPKAESTA Operation * Operation, ID response object) {// 3 NSString * value = responseObject [@ "logo"]; NSLog (@ "% @", value);  

I just get the result (zero) from my NSLog I logo is in JSON when I just show JSON

thanks < / P>

  complete = 1; Data = ({id = 1; address = "14 Avon Road"; address2 = ""; bar = 0; barID = 1; Club = 0; content = dsgsdf; date = "2014-02-12"; finish = " 2014-02-13 00:00:00 "; logo =" http://outtonightapp.com/uploads/terrace.jpg "; name = green; postcode = le 33a; restaurant = 1; send =" 2014-02 -07 00:00:00 "; Start =" 2014-02-05 00:00:00 ";}, {id = 2; address =" 14 Avon Road "; address2 =" "; bar = 1; barID = 1; Club = 0; content = dsgsdf; date = "2014-02-12"; end = "2014-02-13 00:00:00"; logo = "http://outtonightapp.com/uploads/terrace Jpg "; name = green; postcode = le 33a; restaurant = 0; send =" 2014-02-07 00:00:00 "; start =" 2014-02-05 00:00:00 ";}); Rows = 3;  

Here is the output of JSON only

  NSLog (@ "% @", feedback object);  

Your case is responseObject dictionary with two values : You can simply call to get all the logos for 'full' (NSNM) and 'data' (NSARRA NSWX).

  NSArray * allLogos = [[responseObject valueForKey: @ "Data" ] ValueForKey: @ "Logo"]  

Or get all Nested objects and find the appropriate logo between them

  NSArray * allNestedObjects = [responseObject valueForKey: @ "Data"];  

Comments