I'm assuming the problem is this:
self.googlePlacesArrayFromAFNetworking = [responseObjectself.googlePlacesArrayFromAFNetworking = [responseObject objectForKey:@"name"];];
I'm not sure what this code is trying to achieve. If you want to pull out the name
property and this will only be one element you can hardcode it like this:
self.googlePlacesArrayFromAFNetworking = @[ [responseObject objectForKey:@"name"] ];
in this case @[ ]
is creating an array, and inside we place one element, which is the result of [responseObject objectForKey:@"name"]
If there will be many name
's that you need you need to then create an NSMutableArray
, inside the networking callback iterate over the response with a for loop, and use addObject
method to add an element to the array.