In my project I have two different datasets stored in two seperated arrays. Now I'm trying to do a lookup/comparing if some fields are equal and then add the extra values, for example:
Dataset 1:
for ( int i=0; i<[self.plarray count]; i++)
{
Places *object2 = [self.plarray objectAtIndex:i];
ePlaces = object2.pCitpr;
NSLog(@"FD: %@", ePlaces);
}
Dataset 2:
for ( int i=0; i<[self.data count]; i++)
{
Mpobject *object3 = [self.data objectAtIndex:i];
ePlaces2 = object3.oLocation;
NSLog(@"MP: %@", ePlaces2);
}
The second dataset returns a lower count, but the output is also stored in dataset 1. Dataset 1 holds extra values such as (lon/lat) GPS coordinations which I wanna add to Dataset 2.
So, check if dataset1 value is equal to dataset2 value, then add the extra (lon/lat) values to dataset1.
The reason why I need do this is because I have a JSON file in my project which holds GPS coordinations from all the cities and need to set it as a annotation in my mapView.
Now... Dataset 2 only has the cityname so without the coordinates, and I could do a reverse lookup for the coordinates using CLGeocoder but it will give warnings if there are too many requests. Apple's documentation also says you can only do one lookup every minute.
I hope it's understandable.
Ps. excuse my language, I'm from the Netherlands.