Last active
December 28, 2015 17:19
-
-
Save casspangell/7535529 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-(void) processResponseData: (NSDictionary *) responseData { | |
// NSLog(@"%@", responseData); | |
NSArray *arrayOfLocations = [responseData objectForKey:@"data"]; | |
NSDictionary *place = [arrayOfLocations objectAtIndex:2]; | |
NSString *placeName = [place objectForKey:@"name"]; // aka Quiznos | |
NSString *category = [place objectForKey:@"category"]; // aka Food/beverages | |
NSArray *arrayOfCategoryList = [place objectForKey:@"category_list"]; | |
NSDictionary *placeIDAndType = [arrayOfCategoryList objectAtIndex:0]; | |
NSString *placeType = [placeIDAndType objectForKey:@"name"]; //aka Sandwich Shop | |
NSLog(@"%@ %@ %@", placeName, category, placeType); | |
for (id key in place) { | |
// NSLog(@"key: %@ value: %@", key, [place objectForKey:key]); | |
} | |
NSDictionary *placeLocationData = [place objectForKey:@"location"]; | |
for (id key in placeLocationData) { | |
// NSLog(@"key: %@ value: %@", key, [placeLocationData objectForKey:key]); | |
} | |
double latitude = [[placeLocationData objectForKey:@"latitude"] doubleValue]; | |
double longitude = [[placeLocationData objectForKey:@"longitude"] doubleValue]; | |
NSLog(@"%f, %f", latitude, longitude); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment