result is an array comprised of dictionaries. In your example, the array has only one element.
If you want only the first element in the array, then:
if ([result count] > 0) {
NSDictionary *person = [result objectAtIndex:0];
NSString *personName = [person objectForKey:@"name"];
NSString *personUID = [person objectForKey:@"uid"];
…
}
Or, if you want to iterate over all elements in the array — in case the array has more than one element — then:
for (NSDictionary *person in result) {
NSString *personName = [person objectForKey:@"name"];
NSString *personUID = [person objectForKey:@"uid"];
…
}
Note that from your output it’s not possible to know whether uid is a string or a number. The code above considers it’s a string; in case it’s a number, use:
NSInteger personUID = [[person objectForKey:@"uid"] integerValue];
or an appropriate integer type that can hold the range of possible values.
result. It could be a dictionary in that case it would be:NSString *name = [result objectForKey:@"name"];andint uid = [[result objectForKey:@"uid"] intValue];but I am just guessing.-[NSArray description].